diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-03-26 14:12:39 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-03-26 14:12:39 +0300 |
commit | c7d82ec96e2a8dbca2ce02987a16d343563acdcd (patch) | |
tree | 3f3098923596c5a12f83a447edb9b0cf949b870a /source/blender/editors | |
parent | d93fd9ffc132cf094dec0d3c65bd0726718c66a5 (diff) |
F-Curve Modifiers: Experimental 'Additive' option for Generator Modifiers
This setting means that instead of blindly replacing the existing values, the generator modifier will instead apply its effects on top of any existing modifiers (and/or curve data).
Thus, it is now possible to apply effects such sin/cos-based oscillations on top of keyframed motion.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_graph/graph_buttons.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index 7892fe029b6..5207d4843f7 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -284,7 +284,7 @@ static void draw_modifier__generator(uiBlock *block, FCurve *fcu, FModifier *fcm uiBut *but; /* set the height */ - (*height) = 70; + (*height) = 90; switch (data->mode) { case FCM_GENERATOR_POLYNOMIAL: /* polynomial expression */ (*height) += 20*(data->poly_order+1) + 35; @@ -302,9 +302,14 @@ static void draw_modifier__generator(uiBlock *block, FCurve *fcu, FModifier *fcm /* basic settings (backdrop + mode selector + some padding) */ //DRAW_BACKDROP((*height)); // XXX buggy... - but= uiDefButS(block, MENU, B_FMODIFIER_REDRAW, gen_mode, 10,cy,width-30,19, &data->mode, 0, 0, 0, 0, "Selects type of generator algorithm."); - uiButSetFunc(but, validate_fmodifier_cb, fcu, fcm); - cy -= 35; + uiBlockBeginAlign(block); + but= uiDefButS(block, MENU, B_FMODIFIER_REDRAW, gen_mode, 10,cy,width-30,19, &data->mode, 0, 0, 0, 0, "Selects type of generator algorithm."); + uiButSetFunc(but, validate_fmodifier_cb, fcu, fcm); + cy -= 20; + + uiDefButBitS(block, TOG, FCM_GENERATOR_ADDITIVE, B_FMODIFIER_REDRAW, "Additive", 10,cy,width-30,19, &data->flag, 0, 0, 0, 0, "Values generated by this modifier are applied on top of the existing values instead of overwriting them"); + cy -= 35; + uiBlockEndAlign(block); /* now add settings for individual modes */ switch (data->mode) { |