diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-03-19 06:38:14 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-03-19 06:38:14 +0300 |
commit | d89a8c34f3dc1a2923b6853c260de4f1deab9466 (patch) | |
tree | 80be2699ae83bf2a4c4c5bca43ccdc8e252337db /source/blender/makesdna/DNA_anim_types.h | |
parent | 5e7b1bde8d35676bbb5a88f62821ed6689d0761b (diff) |
More F-Modifier Tweaks:
This commit started out aiming to make the "Stepped" F-Modifier (committed last night) even more useful, but ended up fixing a few other finer-points of how F-Modifiers work.
Firstly, the new stuff:
I've addded options to the Stepped F-Modifier to not affect frames before and/or after specified values, and renamed the 'start offset' to 'offset' for clarity.
The main objective of this is to allow Stepped F-Modifiers to only affect certain time ranges, so that by layering/using multiple instances of the F-Modifier, it can be possible to have multiple stepping-sizes.
This allows for effects like:
http://www.pasteall.org/blend/2230
or in words, it provides a convenient mechanism for animators to specify whether sections of the animation is shown "on twos", "fours", or even "forty-second-ths plus a smidgen", as can be easily done with 2D.
Assorted changes to support this:
* Properly fixed up how F-Modifiers that work with time, evaluate the time to evaluate the curve at. Now layered time effects like this should be possible in a much nicer way.
* Added proper value range validation/clamping to many properties. There are still a lot more that need checking, but at least more properties now do "the right thing".
Diffstat (limited to 'source/blender/makesdna/DNA_anim_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_anim_types.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index 44727218f4f..83f68758da9 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -236,9 +236,20 @@ typedef enum eFMod_Noise_Modifications { /* stepped modifier data */ typedef struct FMod_Stepped { float step_size; /* Number of frames each interpolated value should be held */ - float start; /* Reference frame number that stepping starts from */ + float offset; /* Reference frame number that stepping starts from */ + + float start_frame; /* start frame of the frame range that modifier works in */ + float end_frame; /* end frame of the frame range that modifier works in */ + + int flag; /* various settings */ } FMod_Stepped; +/* stepped modifier range flags */ +typedef enum eFMod_Stepped_Flags { + FCM_STEPPED_NO_BEFORE = (1<<0), /* don't affect frames before the start frame */ + FCM_STEPPED_NO_AFTER = (1<<1), /* don't affect frames after the end frame */ +} eFMod_Stepped_Flags; + /* Drivers -------------------------------------- */ /* Driver Target (dtar) |