38#include "RNA_prototypes.hh"
88 if (r_owner_id !=
nullptr) {
116 if (current_index == new_index) {
151 const char *id_prefix)
163 panel_type->
poll = poll;
201 panel_type->
poll = poll;
205 panel_type->
parent = parent;
227 ListBaseT<FModifier> *modifiers = ctx->
modifiers;
258 layout.
prop(ptr,
"use_restricted_range",
UI_ITEM_NONE, std::nullopt, ICON_NONE);
277 col = &layout.
column(
true);
306 sub->
label(
IFACE_(
"<Unknown Modifier>"), ICON_NONE);
309 sub = &layout.
row(
true);
327 TIP_(
"Delete Modifier"));
364 switch (
data->mode) {
373 for (
int i = 0; i <
data->arraysize; i++) {
395 for (
int i = 2; i <
data->arraysize - 1; i += 2) {
409 const char *id_prefix,
443 col = &layout.
column(
false);
453 const char *id_prefix,
484 layout.
label(
"Modifier must be first in the stack.", ICON_STATUS_ERROR);
493 col = &layout.
column(
false);
501 const char *id_prefix,
541 if (!use_legacy_noise) {
550 const char *id_prefix,
595 fedn = MEM_new_array<FCM_EnvelopeData>((env->
totvert + 1),
"FCM_EnvelopeData");
606 if (i < env->totvert) {
611 MEM_delete(env->
data);
617 env->
data = MEM_new<FCM_EnvelopeData>(
"FCM_EnvelopeData");
636 fedn = MEM_new_array<FCM_EnvelopeData>((env->
totvert - 1),
"FCM_EnvelopeData");
644 MEM_delete(env->
data);
650 MEM_SAFE_DELETE(env->
data);
682 IFACE_(
"Add Control Point"),
690 TIP_(
"Add a new control-point to the envelope on the current frame"));
693 col = &layout.
column(
false);
697 for (
int i = 0; i < env->
totvert; i++, fed++) {
699 owner_id, RNA_FModifierEnvelopeControlPoint, fed);
702 row = &col->
row(
true);
703 block = row->
block();
709 but = uiDefIconBut(block,
719 TIP_(
"Delete envelope control point"));
721 block_align_begin(block);
728 const char *id_prefix,
772 col = &layout.
column(
false);
773 row = &col->
row(
true,
IFACE_(
"Maximum X"));
789 const char *id_prefix,
831 row = &layout.
row(
true,
IFACE_(
"End Frame"));
841 const char *id_prefix,
872 layout.
label_multiline(
"Modifier must be first in the stack.", ICON_STATUS_ERROR);
883 const char *id_prefix,
905 ListBaseT<FModifier> *fmodifiers,
916 panel_id_fn(&fcm, panel_idname);
918 PointerRNA *fcm_ptr = MEM_new<PointerRNA>(
"panel customdata");
936 PointerRNA *fcm_ptr = MEM_new<PointerRNA>(
"panel customdata");
946 const char *modifier_panel_prefix,
959 const char *modifier_panel_prefix,
990 if (
ELEM(
nullptr, modifiers, modifiers->first())) {
1019 if (modifiers ==
nullptr) {
1035 fcmN->
curve = curve;
#define SNPRINTF_UTF8(dst, format,...)
#define STRNCPY_UTF8(dst, src)
#define BLT_I18NCONTEXT_MODIFIER
#define BLT_I18NCONTEXT_ID_ACTION
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
Read Blender memory allocation and freeing.
#define POINTER_FROM_INT(i)
#define POINTER_AS_INT(i)
void split(const std::string &s, const char delim, std::vector< std::string > &tokens)
bool panel_list_matches_data(ARegion *region, ListBase *data, ListPanelIDFromDataFunc panel_idname_func)
void panels_free_instanced(const bContext *C, ARegion *region)
void panel_custom_data_set(Panel *panel, PointerRNA *custom_data)
Panel * panel_add_instanced(const bContext *C, ARegion *region, ListBaseT< Panel > *panels, const char *panel_idname, PointerRNA *custom_data)
PointerRNA * panel_custom_data_get(const Panel *panel)
void * MEM_new_uninitialized(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
static void fmodifier_panel_header(const bContext *C, Panel *panel)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
static void envelope_panel_draw(const bContext *C, Panel *panel)
ScrArea * CTX_wm_area(const bContext *C)
static PointerRNA * fmodifier_get_pointers(const bContext *C, const Panel *panel, ID **r_owner_id)
static void panel_register_envelope(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
static void stepped_panel_draw(const bContext *C, Panel *panel)
void(*)(void *data_link, char *r_idname) uiListPanelIDFromDataFunc
static void generator_panel_draw(const bContext *C, Panel *panel)
@ FCM_GENERATOR_POLYNOMIAL
@ FCM_GENERATOR_POLYNOMIAL_FACTORISED
void BKE_fmodifier_ensure_flag(ListBaseT< FModifier > *modifiers)
static void panel_register_noise(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
void copy_fmodifiers(ListBaseT< FModifier > *dst, const ListBaseT< FModifier > *src)
static short get_fmodifier_expand_flag(const bContext *, Panel *panel)
static void fmod_envelope_deletepoint_cb(bContext *C, void *fcm_dv, void *ind_v)
void ANIM_modifier_panels_register_graph_only(ARegionType *region_type, const char *modifier_panel_prefix, PanelTypePollFn poll_function)
const FModifierTypeInfo * fmodifier_get_typeinfo(const FModifier *fcm)
static void fmodifier_frame_range_draw(const bContext *C, Panel *panel)
static void fmodifier_reorder(bContext *C, Panel *panel, int new_index)
bool remove_fmodifier(ListBaseT< FModifier > *modifiers, FModifier *fcm)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
@ FMODIFIER_TYPE_ENVELOPE
@ FMODIFIER_TYPE_FN_GENERATOR
@ FMODIFIER_TYPE_GENERATOR
static void set_fmodifier_expand_flag(const bContext *, Panel *panel, short expand_flag)
static void noise_panel_draw(const bContext *C, Panel *panel)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
void BKE_fcurve_handles_recalc(FCurve &fcu)
static void fn_generator_panel_draw(const bContext *C, Panel *panel)
void DEG_id_tag_update(ID *id, unsigned int flags)
static void panel_register_limits(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
BMesh const char void * data
void ANIM_fmodifier_panels(const bContext *C, ID *owner_id, ListBaseT< FModifier > *fmodifiers, uiListPanelIDFromDataFunc panel_id_fn)
void ED_undo_push(bContext *C, const char *str, UndoEncodeHints hints=UndoEncodeHints(0))
static ListBaseT< FModifier > fmodifier_copypaste_buf
static void panel_register_fn_generator(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
NlaStrip * ANIM_nla_context_strip(const bContext *C)
FModifier * find_active_fmodifier(ListBaseT< FModifier > *modifiers)
LinkData * BLI_genericNodeN(void *data)
void(*)(const bContext *, Panel *) PanelDrawFn
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
SpaceGraph * CTX_wm_space_graph(const bContext *C)
bool ANIM_fmodifiers_paste_from_buf(ListBaseT< FModifier > *modifiers, bool replace, FCurve *curve)
static void fmodifier_frame_range_header_draw(const bContext *C, Panel *panel)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void free_fmodifiers(ListBaseT< FModifier > *modifiers)
static void limits_panel_draw(const bContext *C, Panel *panel)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
static ListBaseT< FModifier > * fmodifier_list_space_specific(const bContext *C)
bool BKE_fcurve_is_cyclic(const FCurve &fcu)
static void smooth_panel_draw(const bContext *C, Panel *panel)
static void fmod_envelope_addpoint_cb(bContext *C, void *fcm_dv, void *)
static void panel_register_generator(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
static void fmodifier_influence_draw(ui::Layout &layout, PointerRNA *ptr)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
static void cycles_panel_draw(const bContext *C, Panel *panel)
void ANIM_fmodifiers_copybuf_free()
@ PANEL_TYPE_HEADER_EXPAND
@ PANEL_TYPE_DEFAULT_CLOSED
FCurve * ANIM_graph_context_fcurve(const bContext *C)
FModifier * copy_fmodifier(const FModifier *src)
int BKE_fcm_envelope_find_index(FCM_EnvelopeData *array, float frame, int arraylen, bool *r_exists)
bool ANIM_fmodifiers_copy_to_buf(ListBaseT< FModifier > *modifiers, bool active)
Scene * CTX_data_scene(const bContext *C)
void ANIM_modifier_panels_register_graph_and_NLA(ARegionType *region_type, const char *modifier_panel_prefix, PanelTypePollFn poll_function)
bool(*)(const bContext *C, PanelType *pt) PanelTypePollFn
static void panel_register_stepped(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
static void delete_fmodifier_cb(bContext *C, void *ctx_v, void *fcm_v)
static void panel_register_cycles(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
ARegion * CTX_wm_region(const bContext *C)
static void panel_register_smooth(ARegionType *region_type, const char *id_prefix, PanelTypePollFn poll_fn)
const FModifierTypeInfo * get_fmodifier_typeinfo(int type)
static PanelType * fmodifier_panel_register(ARegionType *region_type, eFModifier_Types type, PanelDrawFn draw, PanelTypePollFn poll, const char *id_prefix)
static PanelType * fmodifier_subpanel_register(ARegionType *region_type, const char *name, const char *label, PanelDrawFn draw_header, PanelDrawFn draw, PanelTypePollFn poll, PanelType *parent)
void void void bool BLI_listbase_link_move(ListBase *listbase, void *vlink, int step) ATTR_NONNULL()
@ FMODIFIER_FLAG_DISABLED
@ FMODIFIER_FLAG_RANGERESTRICT
@ FMODIFIER_FLAG_USEINFLUENCE
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
ListBaseT< PanelType > paneltypes
ListBaseT< Panel > panels
ListBaseT< FModifier > modifiers
ListBaseT< FModifier > * modifiers
ListBaseT< FModifier > modifiers
void(*) reorder(bContext *C, Panel *pa, int new_index)
char translation_context[BKE_ST_MAXNAME]
short(*) get_list_data_expand_flag(const bContext *C, Panel *pa)
ListBaseT< LinkData > children
char parent_id[BKE_ST_MAXNAME]
void(*) draw(const bContext *C, Panel *panel)
char category[BKE_ST_MAXNAME]
void(*) set_list_data_expand_flag(const bContext *C, Panel *pa, short expand_flag)
bool(*) poll(const bContext *C, PanelType *pt)
void(*) draw_header(const bContext *C, Panel *panel)
char idname[BKE_ST_MAXNAME]
char label[BKE_ST_MAXNAME]
void alignment_set(LayoutAlign alignment)
void use_property_decorate_set(bool is_decorate)
void label_multiline(StringRefNull label, int icon, FontStyleAlign align=UI_STYLE_TEXT_LEFT, int max_lines=0)
void use_property_split_set(bool is_sep)
void label(StringRef name, int icon)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)
void red_alert_set(bool red_alert)
void active_set(bool active)
Layout & split(float percentage, bool align)
Layout & column(bool align)
void separator(float factor=1.0f, LayoutSeparatorType type=LayoutSeparatorType::Auto)
void emboss_set(EmbossType emboss)