38#include "RNA_prototypes.hh"
86 if (r_owner_id !=
nullptr) {
87 *r_owner_id =
ptr->owner_id;
129 if (current_index == new_index) {
162 const char *id_prefix)
173 panel_type->
draw = draw;
174 panel_type->
poll = poll;
211 panel_type->
draw = draw;
212 panel_type->
poll = poll;
216 panel_type->
parent = parent;
230#define B_FMODIFIER_REDRAW 20
318 sub->
label(
IFACE_(
"<Unknown Modifier>"), ICON_NONE);
321 sub = &layout->
row(
true);
340 TIP_(
"Delete Modifier"));
377 switch (
data->mode) {
386 for (
int i = 0;
i <
data->arraysize;
i++) {
398 split->column(
false);
408 for (
int i = 2;
i <
data->arraysize - 1;
i += 2) {
422 const char *id_prefix,
467 const char *id_prefix,
511 const char *id_prefix,
552 if (!use_legacy_noise) {
561 const char *id_prefix,
650 env->
data + (index + 1),
687 row = &layout->
row(
false);
693 IFACE_(
"Add Control Point"),
701 TIP_(
"Add a new control-point to the envelope on the current frame"));
705 col->use_property_split_set(
false);
708 for (
int i = 0;
i < env->
totvert;
i++, fed++) {
710 owner_id, &RNA_FModifierEnvelopeControlPoint, fed);
713 row = &
col->row(
true);
714 block = row->
block();
731 TIP_(
"Delete envelope control point"));
740 const char *id_prefix,
772 row = &
col->row(
true,
IFACE_(
"Minimum X"));
786 row = &
col->row(
true,
IFACE_(
"Maximum X"));
802 const char *id_prefix,
838 row = &layout->
row(
true,
IFACE_(
"Start Frame"));
845 row = &layout->
row(
true,
IFACE_(
"End Frame"));
855 const char *id_prefix,
888 panel_id_fn(fcm, panel_idname);
890 PointerRNA *fcm_ptr = MEM_new<PointerRNA>(
"panel customdata");
908 PointerRNA *fcm_ptr = MEM_new<PointerRNA>(
"panel customdata");
918 const char *modifier_panel_prefix,
930 const char *modifier_panel_prefix,
961 if (
ELEM(
nullptr, modifiers, modifiers->
first)) {
990 if (modifiers ==
nullptr) {
1006 fcmN->
curve = curve;
SpaceGraph * CTX_wm_space_graph(const bContext *C)
ScrArea * CTX_wm_area(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
int BKE_fcm_envelope_find_index(FCM_EnvelopeData *array, float frame, int arraylen, bool *r_exists)
bool BKE_fcurve_is_cyclic(const FCurve *fcu)
FModifier * copy_fmodifier(const FModifier *src)
const FModifierTypeInfo * get_fmodifier_typeinfo(int type)
void copy_fmodifiers(ListBase *dst, const ListBase *src)
void BKE_fcurve_handles_recalc(FCurve *fcu)
bool remove_fmodifier(ListBase *modifiers, FModifier *fcm)
@ FMI_REQUIRES_ORIGINAL_DATA
FModifier * find_active_fmodifier(ListBase *modifiers)
void free_fmodifiers(ListBase *modifiers)
const FModifierTypeInfo * fmodifier_get_typeinfo(const FModifier *fcm)
@ PANEL_TYPE_DEFAULT_CLOSED
@ PANEL_TYPE_HEADER_EXPAND
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
LinkData * BLI_genericNodeN(void *data)
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void void void bool BLI_listbase_link_move(ListBase *listbase, void *vlink, int step) ATTR_NONNULL()
#define SNPRINTF_UTF8(dst, format,...)
#define STRNCPY_UTF8(dst, src)
#define POINTER_FROM_INT(i)
#define POINTER_AS_INT(i)
#define BLT_I18NCONTEXT_ID_ACTION
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
void DEG_id_tag_update(ID *id, unsigned int flags)
@ FMODIFIER_TYPE_FN_GENERATOR
@ FMODIFIER_TYPE_GENERATOR
@ FMODIFIER_TYPE_ENVELOPE
@ FCM_GENERATOR_POLYNOMIAL_FACTORISED
@ FCM_GENERATOR_POLYNOMIAL
@ FMODIFIER_FLAG_USEINFLUENCE
@ FMODIFIER_FLAG_RANGERESTRICT
void(*)(void *data_link, char *r_idname) uiListPanelIDFromDataFunc
NlaStrip * ANIM_nla_context_strip(const bContext *C)
FCurve * ANIM_graph_context_fcurve(const bContext *C)
bool(*)(const bContext *C, PanelType *pt) PanelTypePollFn
void ED_undo_push(bContext *C, const char *str)
static void split(const char *text, const char *seps, char ***str, int *count)
Read Guarded memory(de)allocation.
void UI_but_func_set(uiBut *but, std::function< void(bContext &)> func)
uiBut * uiDefIconBut(uiBlock *block, uiButTypeWithPointerType but_and_ptr_type, int retval, int icon, int x, int y, short width, short height, void *poin, float min, float max, std::optional< blender::StringRef > tip)
void UI_panels_free_instanced(const bContext *C, ARegion *region)
void UI_panel_custom_data_set(Panel *panel, PointerRNA *custom_data)
void UI_block_align_begin(uiBlock *block)
bool UI_panel_list_matches_data(ARegion *region, ListBase *data, uiListPanelIDFromDataFunc panel_idname_func)
PointerRNA * UI_panel_custom_data_get(const Panel *panel)
void UI_but_funcN_set(uiBut *but, uiButHandleNFunc funcN, void *argN, void *arg2, uiButArgNFree func_argN_free_fn=MEM_freeN, uiButArgNCopy func_argN_copy_fn=MEM_dupallocN)
Panel * UI_panel_add_instanced(const bContext *C, ARegion *region, ListBase *panels, const char *panel_idname, PointerRNA *custom_data)
uiBut * uiDefBut(uiBlock *block, uiButTypeWithPointerType but_and_ptr_type, int retval, blender::StringRef str, int x, int y, short width, short height, void *poin, float min, float max, std::optional< blender::StringRef > tip)
BMesh const char void * data
#define B_FMODIFIER_REDRAW
static void delete_fmodifier_cb(bContext *C, void *ctx_v, void *fcm_v)
static void panel_register_noise(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
bool ANIM_fmodifiers_paste_from_buf(ListBase *modifiers, bool replace, FCurve *curve)
static void fmodifier_frame_range_draw(const bContext *C, Panel *panel)
static void fmodifier_panel_header(const bContext *C, Panel *panel)
static void fmod_envelope_deletepoint_cb(bContext *, void *fcm_dv, void *ind_v)
static void cycles_panel_draw(const bContext *C, Panel *panel)
static PointerRNA * fmodifier_get_pointers(const bContext *C, const Panel *panel, ID **r_owner_id)
static PanelType * fmodifier_panel_register(ARegionType *region_type, eFModifier_Types type, PanelDrawFn draw, PanelTypePollFn poll, const char *id_prefix)
static void panel_register_stepped(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
static void fmodifier_frame_range_header_draw(const bContext *C, Panel *panel)
static void fmodifier_reorder(bContext *C, Panel *panel, int new_index)
static void generator_panel_draw(const bContext *C, Panel *panel)
void(*)(const bContext *, Panel *) PanelDrawFn
static void fn_generator_panel_draw(const bContext *C, Panel *panel)
static void panel_register_cycles(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
static void noise_panel_draw(const bContext *C, Panel *panel)
static ListBase fmodifier_copypaste_buf
void ANIM_modifier_panels_register_graph_only(ARegionType *region_type, const char *modifier_panel_prefix, PanelTypePollFn poll_function)
static void fmodifier_influence_draw(uiLayout *layout, PointerRNA *ptr)
void ANIM_modifier_panels_register_graph_and_NLA(ARegionType *region_type, const char *modifier_panel_prefix, PanelTypePollFn poll_function)
static ListBase * fmodifier_list_space_specific(const bContext *C)
static void panel_register_limits(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
static void panel_register_envelope(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
void ANIM_fmodifiers_copybuf_free()
static void set_fmodifier_expand_flag(const bContext *, Panel *panel, short expand_flag)
static PanelType * fmodifier_subpanel_register(ARegionType *region_type, const char *name, const char *label, PanelDrawFn draw_header, PanelDrawFn draw, PanelTypePollFn poll, PanelType *parent)
static void panel_register_generator(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
static void limits_panel_draw(const bContext *C, Panel *panel)
static void envelope_panel_draw(const bContext *C, Panel *panel)
static void fmod_envelope_addpoint_cb(bContext *C, void *fcm_dv, void *)
bool ANIM_fmodifiers_copy_to_buf(ListBase *modifiers, bool active)
static void stepped_panel_draw(const bContext *C, Panel *panel)
void ANIM_fmodifier_panels(const bContext *C, ID *owner_id, ListBase *fmodifiers, uiListPanelIDFromDataFunc panel_id_fn)
static short get_fmodifier_expand_flag(const bContext *, Panel *panel)
static void panel_register_fn_generator(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
void * MEM_mallocN(size_t len, const char *str)
void * MEM_calloc_arrayN(size_t len, size_t size, const char *str)
void * MEM_callocN(size_t len, const char *str)
void MEM_freeN(void *vmemh)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
void(* reorder)(bContext *C, Panel *pa, int new_index)
void(* set_list_data_expand_flag)(const bContext *C, Panel *pa, short expand_flag)
void(* draw)(const bContext *C, Panel *panel)
char idname[BKE_ST_MAXNAME]
bool(* poll)(const bContext *C, PanelType *pt)
char translation_context[BKE_ST_MAXNAME]
char category[BKE_ST_MAXNAME]
char label[BKE_ST_MAXNAME]
short(* get_list_data_expand_flag)(const bContext *C, Panel *pa)
char parent_id[BKE_ST_MAXNAME]
void(* draw_header)(const bContext *C, Panel *panel)
void use_property_decorate_set(bool is_sep)
void alignment_set(blender::ui::LayoutAlign alignment)
void label(blender::StringRef name, int icon)
uiLayout & column(bool align)
void active_set(bool active)
void separator(float factor=1.0f, LayoutSeparatorType type=LayoutSeparatorType::Auto)
uiLayout & row(bool align)
void emboss_set(blender::ui::EmbossType emboss)
void use_property_split_set(bool value)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)
void WM_global_report(eReportType type, const char *message)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)