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:
authorJoshua Leung <aligorith@gmail.com>2009-06-10 09:03:27 +0400
committerJoshua Leung <aligorith@gmail.com>2009-06-10 09:03:27 +0400
commit867e1291350de7c128c18c9f9a2e7c4b7a5513f4 (patch)
tree83538c77dc690760e74121c6c195258da69ad005 /source/blender/editors/space_graph/graph_buttons.c
parent2f8290434ca1e36c8a60ebc405a3edaacd41e9a9 (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.c5
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;