Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/animation/fmodifier_ui.c')
-rw-r--r--source/blender/editors/animation/fmodifier_ui.c51
1 files changed, 29 insertions, 22 deletions
diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c
index e795cb6e3ef..eadaa449b92 100644
--- a/source/blender/editors/animation/fmodifier_ui.c
+++ b/source/blender/editors/animation/fmodifier_ui.c
@@ -717,28 +717,31 @@ static void draw_modifier__envelope(uiLayout *layout,
/* control points list */
for (i = 0, fed = env->data; i < env->totvert; i++, fed++) {
+ PointerRNA ctrl_ptr;
+ RNA_pointer_create(fcurve_owner_id, &RNA_FModifierEnvelopeControlPoint, fed, &ctrl_ptr);
+
/* get a new row to operate on */
row = uiLayoutRow(layout, true);
block = uiLayoutGetBlock(row);
UI_block_align_begin(block);
- but = uiDefButF(block,
- UI_BTYPE_NUM,
- B_FMODIFIER_REDRAW,
- IFACE_("Fra:"),
- 0,
- 0,
- 4.5 * UI_UNIT_X,
- UI_UNIT_Y,
- &fed->time,
- -MAXFRAMEF,
- MAXFRAMEF,
- 10,
- 1,
- TIP_("Frame that envelope point occurs"));
- UI_but_func_set(but, validate_fmodifier_cb, fcm, NULL);
-
- uiDefButF(block,
+ uiDefButR(block,
+ UI_BTYPE_NUM,
+ B_FMODIFIER_REDRAW,
+ IFACE_("Fra:"),
+ 0,
+ 0,
+ 4.5 * UI_UNIT_X,
+ UI_UNIT_Y,
+ &ctrl_ptr,
+ "frame",
+ -1,
+ -MAXFRAMEF,
+ MAXFRAMEF,
+ 10,
+ 1,
+ NULL);
+ uiDefButR(block,
UI_BTYPE_NUM,
B_FMODIFIER_REDRAW,
IFACE_("Min:"),
@@ -746,13 +749,15 @@ static void draw_modifier__envelope(uiLayout *layout,
0,
5 * UI_UNIT_X,
UI_UNIT_Y,
- &fed->min,
+ &ctrl_ptr,
+ "min",
+ -1,
-UI_FLT_MAX,
UI_FLT_MAX,
10,
2,
- TIP_("Minimum bound of envelope at this point"));
- uiDefButF(block,
+ NULL);
+ uiDefButR(block,
UI_BTYPE_NUM,
B_FMODIFIER_REDRAW,
IFACE_("Max:"),
@@ -760,12 +765,14 @@ static void draw_modifier__envelope(uiLayout *layout,
0,
5 * UI_UNIT_X,
UI_UNIT_Y,
- &fed->max,
+ &ctrl_ptr,
+ "max",
+ -1,
-UI_FLT_MAX,
UI_FLT_MAX,
10,
2,
- TIP_("Maximum bound of envelope at this point"));
+ NULL);
but = uiDefIconBut(block,
UI_BTYPE_BUT,