diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-06-10 09:03:27 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-06-10 09:03:27 +0400 |
commit | 867e1291350de7c128c18c9f9a2e7c4b7a5513f4 (patch) | |
tree | 83538c77dc690760e74121c6c195258da69ad005 /source/blender/editors/space_graph/graph_buttons.c | |
parent | 2f8290434ca1e36c8a60ebc405a3edaacd41e9a9 (diff) |
F-Modifiers (in Nla branch):
For fun, added 'sinc' (i.e. y = sin(pi*x)/(pi*x)) as a type of builtin function usable through the generator modifier. This makes a nice 'jolt' which tapers off.
Diffstat (limited to 'source/blender/editors/space_graph/graph_buttons.c')
-rw-r--r-- | source/blender/editors/space_graph/graph_buttons.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index a4babaad74c..5b00205b5d0 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -405,7 +405,7 @@ static void draw_modifier__generator(uiBlock *block, FCurve *fcu, FModifier *fcm { FMod_Generator *data= (FMod_Generator *)fcm->data; char gen_mode[]="Generator Type%t|Expanded Polynomial%x0|Factorised Polynomial%x1|Built-In Function%x2|Expression%x3"; - char fn_type[]="Built-In Function%t|Sin%x0|Cos%x1|Tan%x2|Square Root%x3|Natural Log%x4"; + char fn_type[]="Built-In Function%t|Sin%x0|Cos%x1|Tan%x2|Square Root%x3|Natural Log%x4|Normalised Sin%x5"; int cy= *yco - 30; uiBut *but; @@ -555,6 +555,9 @@ static void draw_modifier__generator(uiBlock *block, FCurve *fcu, FModifier *fcm case FCM_GENERATOR_FN_SQRT: /* square root */ sprintf(func_name, "sqrt("); break; + case FCM_GENERATOR_FN_SINC: /* normalised sine wave */ + sprintf(func_name, "sinc("); + break; default: /* unknown */ sprintf(func_name, "<fn?>("); break; |