Compare commits

...

25 Commits

Author SHA1 Message Date
a17de3ed5f Properly gray out modifiers when FCurve has them turned off 2020-10-18 21:46:27 -05:00
dd9e2cd6fa Review feedback from Julian 2020-10-18 20:44:49 -05:00
a5ad2d7f75 Merge branch 'master' into fcurve-modifier-panels 2020-10-18 19:54:09 -05:00
7c977ae4c9 Merge branch 'master' into fcurve-modifier-panels 2020-10-07 16:18:37 -05:00
9e55344d89 Add versioning for graph editor FModifier panel expansion 2020-09-02 14:31:30 -05:00
b2890d6366 Merge branch 'master' into fcurve-modifier-panels 2020-09-02 14:31:15 -05:00
1f82713fb1 Context works in both NLA and graph editor 2020-09-01 11:34:18 -05:00
fb61d6d1bd Merge branch 'master' into fcurve-modifier-panels 2020-08-31 23:02:43 -05:00
0a93775715 Fix after merging master 2020-08-21 16:09:43 -04:00
1b19bc7b8e Merge branch 'master' into fcurve-modifier-panels 2020-08-21 15:39:18 -04:00
320bc5360c Use panel custom data
Very unstable, and the delete button doesn't work. It's probably
best to just expose graph_panel_context and the equivalent NLA function.
2020-08-13 16:39:11 -04:00
2d88c64b61 Merge branch 'master' into fcurve-modifier-panels 2020-08-13 13:47:30 -04:00
0d5b62db04 Remove unecessary change 2020-08-12 13:01:38 -04:00
0d3cb37626 Merge branch 'master' into fcurve-modifier-panels 2020-08-12 12:59:46 -04:00
84ba71ba32 Merge branch 'master' into fcurve-modifier-panels 2020-08-12 12:44:59 -04:00
384ccd1671 Check category before adding instanced panels to layout 2020-08-12 12:42:20 -04:00
318a5cc4ba Use const, fix clang-tidy building 2020-08-12 11:36:07 -04:00
1d8f17c64e Add comment 2020-08-12 11:35:40 -04:00
d52081d048 No header for NLA modifier add panel 2020-08-12 11:35:10 -04:00
bb3d0e4904 Merge branch 'master' into fcurve-modifier-panels 2020-08-12 10:27:24 -04:00
a5e456f913 Generator panel improvements, fix memory leak 2020-07-10 11:54:57 -04:00
75bd1b4bb8 Merge branch 'master' into fcurve-modifier-panels 2020-07-10 10:17:38 -04:00
06349b903b Add frame range panel to cycles modifier 2020-06-11 11:28:34 -04:00
fea5097eb8 UI: Drag and Drop FModifiers, Layout Updates
There are still problems
 - Context doesn't work in NLA editor
 - Lots of memory leaks for anim context.
   Should find a different method for getting the context that doesn't require a "free" every time.

This also adds support for regions with panel categories to the list panel system, which was a simple oversight.

Differential Revision: https://developer.blender.org/D7997
2020-06-11 11:16:04 -04:00
afa83b5bce List panel system: Support regions with categories 2020-06-11 11:11:30 -04:00
8 changed files with 802 additions and 679 deletions

View File

@@ -1133,7 +1133,7 @@ FModifier *add_fmodifier(ListBase *modifiers, int type, FCurve *owner_fcu)
/* add modifier itself */ /* add modifier itself */
fcm = MEM_callocN(sizeof(FModifier), "F-Curve Modifier"); fcm = MEM_callocN(sizeof(FModifier), "F-Curve Modifier");
fcm->type = type; fcm->type = type;
fcm->flag = FMODIFIER_FLAG_EXPANDED; fcm->ui_expand_flag = (1 << 0); /* Expand the main panel, not the subpanels. */
fcm->curve = owner_fcu; fcm->curve = owner_fcu;
fcm->influence = 1.0f; fcm->influence = 1.0f;
BLI_addtail(modifiers, fcm); BLI_addtail(modifiers, fcm);

View File

@@ -875,5 +875,19 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
*/ */
{ {
/* Keep this block, even when empty. */ /* Keep this block, even when empty. */
/* Move to storing expansion for all panels of FModifiers. */
LISTBASE_FOREACH (bAction *, act, &bmain->actions) {
LISTBASE_FOREACH (FCurve *, fcu, &act->curves) {
LISTBASE_FOREACH (FModifier *, fcm, &fcu->modifiers) {
if (fcm->flag & FMODIFIER_FLAG_EXPANDED) {
fcm->ui_expand_flag = 1;
}
else {
fcm->ui_expand_flag = 0;
}
}
}
}
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -33,7 +33,11 @@ struct ID;
struct ListBase; struct ListBase;
struct ARegion; struct ARegion;
struct ARegionType;
struct Main; struct Main;
struct NlaStrip;
struct FModifier;
struct PanelType;
struct ReportList; struct ReportList;
struct ScrArea; struct ScrArea;
struct SpaceLink; struct SpaceLink;
@@ -675,11 +679,38 @@ void ANIM_draw_framerange(struct Scene *scene, struct View2D *v2d);
/* ------------- UI Panel Drawing -------------- */ /* ------------- UI Panel Drawing -------------- */
/* draw a given F-Modifier for some layout/UI-Block */ struct NlaStrip *ANIM_nla_context_strip(const struct bContext *C);
void ANIM_uiTemplate_fmodifier_draw(struct uiLayout *layout, struct FCurve *ANIM_graph_context_fcurve(const struct bContext *C);
struct ID *fcurve_owner_id,
ListBase *modifiers, typedef bool (*PanelTypePollFn)(const struct bContext *C, struct PanelType *pt);
struct FModifier *fcm); typedef void (*uiListPanelIDFromDataFunc)(void *data_link, char *r_idname);
void ANIM_fmodifier_panels(const struct bContext *C,
struct ID *owner_id,
ListBase *fmodifiers,
uiListPanelIDFromDataFunc panel_id_fn);
void ANIM_fmodifiers_generator_panel_register(struct ARegionType *region_type,
const char *id_prefix,
PanelTypePollFn poll_fn);
void ANIM_fmodifiers_fn_generator_panel_register(struct ARegionType *region_type,
const char *id_prefix,
PanelTypePollFn poll_fn);
void ANIM_fmodifiers_cycles_panel_register(struct ARegionType *region_type,
const char *id_prefix,
PanelTypePollFn poll_fn);
void ANIM_fmodifiers_noise_panel_register(struct ARegionType *region_type,
const char *id_prefix,
PanelTypePollFn poll_fn);
void ANIM_fmodifiers_envelope_panel_register(struct ARegionType *region_type,
const char *id_prefix,
PanelTypePollFn poll_fn);
void ANIM_fmodifers_limits_panel_register(struct ARegionType *region_type,
const char *id_prefix,
PanelTypePollFn poll_fn);
void ANIM_fmodifiers_stepped_panel_register(struct ARegionType *region_type,
const char *id_prefix,
PanelTypePollFn poll_fn);
/* ------------- Copy/Paste Buffer -------------- */ /* ------------- Copy/Paste Buffer -------------- */

View File

@@ -105,6 +105,16 @@ static bool graph_panel_context(const bContext *C, bAnimListElem **ale, FCurve *
return true; return true;
} }
FCurve *ANIM_graph_context_fcurve(const bContext *C)
{
FCurve *fcu;
if (!graph_panel_context(C, NULL, &fcu)) {
return NULL;
}
return fcu;
}
static bool graph_panel_poll(const bContext *C, PanelType *UNUSED(pt)) static bool graph_panel_poll(const bContext *C, PanelType *UNUSED(pt))
{ {
return graph_panel_context(C, NULL, NULL); return graph_panel_context(C, NULL, NULL);
@@ -1313,6 +1323,15 @@ static void graph_panel_drivers_popover(const bContext *C, Panel *panel)
/* All the drawing code is in editors/animation/fmodifier_ui.c */ /* All the drawing code is in editors/animation/fmodifier_ui.c */
#define B_FMODIFIER_REDRAW 20 #define B_FMODIFIER_REDRAW 20
#define GRAPH_FMODIFIER_PANEL_PREFIX "GRAPH"
static void graph_fmodifier_panel_id(void *fcm_link, char *r_name)
{
FModifier *fcm = (FModifier *)fcm_link;
eFModifier_Types type = fcm->type;
const FModifierTypeInfo *fmi = get_fmodifier_typeinfo(type);
BLI_snprintf(r_name, BKE_ST_MAXNAME, "%s_PT_%s", GRAPH_FMODIFIER_PANEL_PREFIX, fmi->name);
}
static void do_graph_region_modifier_buttons(bContext *C, void *UNUSED(arg), int event) static void do_graph_region_modifier_buttons(bContext *C, void *UNUSED(arg), int event)
{ {
@@ -1328,10 +1347,8 @@ static void graph_panel_modifiers(const bContext *C, Panel *panel)
{ {
bAnimListElem *ale; bAnimListElem *ale;
FCurve *fcu; FCurve *fcu;
FModifier *fcm; uiLayout *row;
uiLayout *col, *row;
uiBlock *block; uiBlock *block;
bool active;
if (!graph_panel_context(C, &ale, &fcu)) { if (!graph_panel_context(C, &ale, &fcu)) {
return; return;
@@ -1356,14 +1373,7 @@ static void graph_panel_modifiers(const bContext *C, Panel *panel)
uiItemO(row, "", ICON_PASTEDOWN, "GRAPH_OT_fmodifier_paste"); uiItemO(row, "", ICON_PASTEDOWN, "GRAPH_OT_fmodifier_paste");
} }
active = !(fcu->flag & FCURVE_MOD_OFF); ANIM_fmodifier_panels(C, ale->fcurve_owner_id, &fcu->modifiers, graph_fmodifier_panel_id);
/* draw each modifier */
for (fcm = fcu->modifiers.first; fcm; fcm = fcm->next) {
col = uiLayoutColumn(panel->layout, true);
uiLayoutSetActive(col, active);
ANIM_uiTemplate_fmodifier_draw(col, ale->fcurve_owner_id, &fcu->modifiers, fcm);
}
MEM_freeN(ale); MEM_freeN(ale);
} }
@@ -1427,10 +1437,20 @@ void graph_buttons_register(ARegionType *art)
strcpy(pt->label, N_("Modifiers")); strcpy(pt->label, N_("Modifiers"));
strcpy(pt->category, "Modifiers"); strcpy(pt->category, "Modifiers");
strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA);
pt->flag = PNL_NO_HEADER;
pt->draw = graph_panel_modifiers; pt->draw = graph_panel_modifiers;
pt->poll = graph_panel_poll; pt->poll = graph_panel_poll;
BLI_addtail(&art->paneltypes, pt); BLI_addtail(&art->paneltypes, pt);
const char *fmodifier_panel_prefix = GRAPH_FMODIFIER_PANEL_PREFIX;
ANIM_fmodifiers_generator_panel_register(art, fmodifier_panel_prefix, graph_panel_poll);
ANIM_fmodifiers_fn_generator_panel_register(art, fmodifier_panel_prefix, graph_panel_poll);
ANIM_fmodifiers_cycles_panel_register(art, fmodifier_panel_prefix, graph_panel_poll);
ANIM_fmodifiers_noise_panel_register(art, fmodifier_panel_prefix, graph_panel_poll);
ANIM_fmodifiers_envelope_panel_register(art, fmodifier_panel_prefix, graph_panel_poll);
ANIM_fmodifers_limits_panel_register(art, fmodifier_panel_prefix, graph_panel_poll);
ANIM_fmodifiers_stepped_panel_register(art, fmodifier_panel_prefix, graph_panel_poll);
pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel view"); pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel view");
strcpy(pt->idname, "GRAPH_PT_view"); strcpy(pt->idname, "GRAPH_PT_view");
strcpy(pt->label, N_("Show Cursor")); strcpy(pt->label, N_("Show Cursor"));

View File

@@ -37,6 +37,7 @@
#include "BLT_translation.h" #include "BLT_translation.h"
#include "BKE_context.h" #include "BKE_context.h"
#include "BKE_fcurve.h"
#include "BKE_nla.h" #include "BKE_nla.h"
#include "BKE_screen.h" #include "BKE_screen.h"
@@ -184,6 +185,17 @@ bool nla_panel_context(const bContext *C,
return (found != 0); return (found != 0);
} }
NlaStrip *ANIM_nla_context_strip(const bContext *C)
{
PointerRNA strip_ptr;
if (!nla_panel_context(C, NULL, NULL, &strip_ptr)) {
return NULL;
}
NlaStrip *strip = strip_ptr.data;
return strip;
}
#if 0 #if 0
static bool nla_panel_poll(const bContext *C, PanelType *pt) static bool nla_panel_poll(const bContext *C, PanelType *pt)
{ {
@@ -535,13 +547,23 @@ static void nla_panel_animated_strip_time(const bContext *C, Panel *panel)
uiItemR(layout, &strip_ptr, "strip_time", 0, NULL, ICON_NONE); uiItemR(layout, &strip_ptr, "strip_time", 0, NULL, ICON_NONE);
} }
#define NLA_FMODIFIER_PANEL_PREFIX "NLA"
static void nla_fmodifier_panel_id(void *fcm_link, char *r_name)
{
FModifier *fcm = (FModifier *)fcm_link;
eFModifier_Types type = fcm->type;
snprintf(r_name, BKE_ST_MAXNAME, "%s_PT_", NLA_FMODIFIER_PANEL_PREFIX);
const FModifierTypeInfo *fmi = get_fmodifier_typeinfo(type);
BLI_snprintf(r_name, BKE_ST_MAXNAME, "%s_PT_%s", NLA_FMODIFIER_PANEL_PREFIX, fmi->name);
}
/* F-Modifiers for active NLA-Strip */ /* F-Modifiers for active NLA-Strip */
static void nla_panel_modifiers(const bContext *C, Panel *panel) static void nla_panel_modifiers(const bContext *C, Panel *panel)
{ {
PointerRNA strip_ptr; PointerRNA strip_ptr;
NlaStrip *strip; NlaStrip *strip;
FModifier *fcm; uiLayout *row;
uiLayout *col, *row;
uiBlock *block; uiBlock *block;
/* check context and also validity of pointer */ /* check context and also validity of pointer */
@@ -569,12 +591,7 @@ static void nla_panel_modifiers(const bContext *C, Panel *panel)
uiItemO(row, "", ICON_PASTEDOWN, "NLA_OT_fmodifier_paste"); uiItemO(row, "", ICON_PASTEDOWN, "NLA_OT_fmodifier_paste");
} }
/* draw each modifier */ ANIM_fmodifier_panels(C, strip_ptr.owner_id, &strip->modifiers, nla_fmodifier_panel_id);
for (fcm = strip->modifiers.first; fcm; fcm = fcm->next) {
col = uiLayoutColumn(panel->layout, true);
ANIM_uiTemplate_fmodifier_draw(col, strip_ptr.owner_id, &strip->modifiers, fcm);
}
} }
/* ******************* general ******************************** */ /* ******************* general ******************************** */
@@ -657,5 +674,15 @@ void nla_buttons_register(ARegionType *art)
strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA); strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA);
pt->draw = nla_panel_modifiers; pt->draw = nla_panel_modifiers;
pt->poll = nla_strip_eval_panel_poll; pt->poll = nla_strip_eval_panel_poll;
pt->flag = PNL_NO_HEADER;
BLI_addtail(&art->paneltypes, pt); BLI_addtail(&art->paneltypes, pt);
const char *modifier_panel_prefix = NLA_FMODIFIER_PANEL_PREFIX;
ANIM_fmodifiers_generator_panel_register(art, modifier_panel_prefix, nla_strip_eval_panel_poll);
ANIM_fmodifiers_fn_generator_panel_register(
art, modifier_panel_prefix, nla_strip_eval_panel_poll);
ANIM_fmodifiers_noise_panel_register(art, modifier_panel_prefix, nla_strip_eval_panel_poll);
ANIM_fmodifiers_envelope_panel_register(art, modifier_panel_prefix, nla_strip_eval_panel_poll);
ANIM_fmodifers_limits_panel_register(art, modifier_panel_prefix, nla_strip_eval_panel_poll);
ANIM_fmodifiers_stepped_panel_register(art, modifier_panel_prefix, nla_strip_eval_panel_poll);
} }

View File

@@ -57,6 +57,10 @@ typedef struct FModifier {
short type; short type;
/** Settings for the modifier. */ /** Settings for the modifier. */
short flag; short flag;
/** Expansion state for the modifier panel and subpanels. */
short ui_expand_flag;
char _pad[6];
/** The amount that the modifier should influence the value. */ /** The amount that the modifier should influence the value. */
float influence; float influence;
@@ -96,8 +100,10 @@ typedef enum eFModifier_Types {
typedef enum eFModifier_Flags { typedef enum eFModifier_Flags {
/** Modifier is not able to be evaluated for some reason, and should be skipped (internal). */ /** Modifier is not able to be evaluated for some reason, and should be skipped (internal). */
FMODIFIER_FLAG_DISABLED = (1 << 0), FMODIFIER_FLAG_DISABLED = (1 << 0),
#ifdef DNA_DEPRECATED_ALLOW
/** Modifier's data is expanded (in UI). */ /** Modifier's data is expanded (in UI). */
FMODIFIER_FLAG_EXPANDED = (1 << 1), FMODIFIER_FLAG_EXPANDED = (1 << 1),
#endif
/** Modifier is active one (in UI) for editing purposes. */ /** Modifier is active one (in UI) for editing purposes. */
FMODIFIER_FLAG_ACTIVE = (1 << 2), FMODIFIER_FLAG_ACTIVE = (1 << 2),
/** User wants modifier to be skipped. */ /** User wants modifier to be skipped. */

View File

@@ -1109,6 +1109,17 @@ static void rna_Keyframe_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *p
rna_tag_animation_update(bmain, ptr->owner_id); rna_tag_animation_update(bmain, ptr->owner_id);
} }
static void rna_FModifier_show_expanded_set(PointerRNA *ptr, bool value)
{
FModifier *fcm = ptr->data;
if (value) {
fcm->ui_expand_flag |= (1 << 0);
}
else {
fcm->ui_expand_flag &= ~(1 << 0);
}
}
#else #else
static void rna_def_fmodifier_generator(BlenderRNA *brna) static void rna_def_fmodifier_generator(BlenderRNA *brna)
@@ -1199,7 +1210,7 @@ static void rna_def_fmodifier_function_generator(BlenderRNA *brna)
prop = RNA_def_property(srna, "phase_multiplier", PROP_FLOAT, PROP_NONE); prop = RNA_def_property(srna, "phase_multiplier", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text( RNA_def_property_ui_text(
prop, "Phase Multiplier", "Scale factor determining the 'speed' of the function"); prop, "Phase Multiple", "Scale factor determining the 'speed' of the function");
RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, "rna_FModifier_update"); RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, "rna_FModifier_update");
prop = RNA_def_property(srna, "phase_offset", PROP_FLOAT, PROP_NONE); prop = RNA_def_property(srna, "phase_offset", PROP_FLOAT, PROP_NONE);
@@ -1612,13 +1623,14 @@ static void rna_def_fmodifier(BlenderRNA *brna)
/* settings */ /* settings */
prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE); prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE); RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FMODIFIER_FLAG_EXPANDED); RNA_def_property_boolean_sdna(prop, NULL, "ui_expand_flag", 0);
RNA_def_property_boolean_funcs(prop, NULL, "rna_FModifier_show_expanded_set");
RNA_def_property_ui_text(prop, "Expanded", "F-Curve Modifier's panel is expanded in UI"); RNA_def_property_ui_text(prop, "Expanded", "F-Curve Modifier's panel is expanded in UI");
RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1); RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1);
prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE); prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FMODIFIER_FLAG_MUTED); RNA_def_property_boolean_sdna(prop, NULL, "flag", FMODIFIER_FLAG_MUTED);
RNA_def_property_ui_text(prop, "Muted", "Disable F-Curve Modifier evaluation"); RNA_def_property_ui_text(prop, "Enabled", "Enable F-Curve modifier evaluation");
RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME_PROP, "rna_FModifier_update"); RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME_PROP, "rna_FModifier_update");
RNA_def_property_ui_icon(prop, ICON_CHECKBOX_HLT, -1); RNA_def_property_ui_icon(prop, ICON_CHECKBOX_HLT, -1);
@@ -1632,7 +1644,7 @@ static void rna_def_fmodifier(BlenderRNA *brna)
/* TODO: setting this to true must ensure that all others in stack are turned off too... */ /* TODO: setting this to true must ensure that all others in stack are turned off too... */
prop = RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE); prop = RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FMODIFIER_FLAG_ACTIVE); RNA_def_property_boolean_sdna(prop, NULL, "flag", FMODIFIER_FLAG_ACTIVE);
RNA_def_property_ui_text(prop, "Active", "F-Curve Modifier is the one being edited"); RNA_def_property_ui_text(prop, "Active", "F-Curve modifier will show settings in the editor");
RNA_def_property_boolean_funcs(prop, NULL, "rna_FModifier_active_set"); RNA_def_property_boolean_funcs(prop, NULL, "rna_FModifier_active_set");
RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME_PROP, "rna_FModifier_active_update"); RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME_PROP, "rna_FModifier_active_update");
RNA_def_property_ui_icon(prop, ICON_RADIOBUT_OFF, 1); RNA_def_property_ui_icon(prop, ICON_RADIOBUT_OFF, 1);
@@ -1646,8 +1658,6 @@ static void rna_def_fmodifier(BlenderRNA *brna)
"F-Curve Modifier is only applied for the specified frame range to help " "F-Curve Modifier is only applied for the specified frame range to help "
"mask off effects in order to chain them"); "mask off effects in order to chain them");
RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME_PROP, "rna_FModifier_update"); RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME_PROP, "rna_FModifier_update");
RNA_def_property_ui_icon(
prop, ICON_DISCLOSURE_TRI_RIGHT, 1); /* XXX: depends on UI implementation */
prop = RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE); prop = RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sfra"); RNA_def_property_float_sdna(prop, NULL, "sfra");
@@ -1689,8 +1699,6 @@ static void rna_def_fmodifier(BlenderRNA *brna)
RNA_def_property_ui_text( RNA_def_property_ui_text(
prop, "Use Influence", "F-Curve Modifier's effects will be tempered by a default factor"); prop, "Use Influence", "F-Curve Modifier's effects will be tempered by a default factor");
RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME_PROP, "rna_FModifier_update"); RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME_PROP, "rna_FModifier_update");
RNA_def_property_ui_icon(
prop, ICON_DISCLOSURE_TRI_RIGHT, 1); /* XXX: depends on UI implementation */
prop = RNA_def_property(srna, "influence", PROP_FLOAT, PROP_FACTOR); prop = RNA_def_property(srna, "influence", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "influence"); RNA_def_property_float_sdna(prop, NULL, "influence");