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:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-10-29 22:10:52 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-10-29 22:10:52 +0400
commit16d13e0db9d75566735966d81d213958df3ca7e5 (patch)
tree90d32baaabc12a690360bea0f9129bd2c2e1b436 /source/blender/editors/include/ED_anim_api.h
parentf6e504cee9f85867554f5a0ab89b52a66c0f257e (diff)
Project Pampa request: FCurves normalized display
Added two options to a header of FCurve editor: - Normalize which makes it so every individual curve is fit into -1..1 space. - Auto-normalize, which probably is to be called "Lock" which "locks" curve normalization scale. This is useful to prevent curves from jumping around when tweaking it. It's debatable whether it need to be a button to normalize curves n purpose only, and it's fully depends on animator's workflow. Here during Project Pampa we've got Francesco who get used to auto-renormalization and Hjalti who prefers locked behavior. Docs are to be ready soon by Francesco. Thanks Brecht for the review!
Diffstat (limited to 'source/blender/editors/include/ED_anim_api.h')
-rw-r--r--source/blender/editors/include/ED_anim_api.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index d23c57273ec..d98fa1fc32f 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -559,10 +559,19 @@ typedef enum eAnimUnitConv_Flags {
/* only touch selected vertices */
ANIM_UNITCONV_SELVERTS = (1 << 3),
ANIM_UNITCONV_SKIPKNOTS = (1 << 4),
+ /* Scale FCurve i a way it fits to -1..1 space */
+ ANIM_UNITCONV_NORMALIZE = (1 << 5),
+ /* Only whennormalization is used: use scale factor from previous run,
+ * prevents curves from jumping all over the place when tweaking them.
+ */
+ ANIM_UNITCONV_NORMALIZE_FREEZE = (1 << 6),
} eAnimUnitConv_Flags;
+/* Normalizatin flags from Space Graph passing to ANIM_unit_mapping_get_factor */
+short ANIM_get_normalization_flags(bAnimContext *ac);
+
/* Get unit conversion factor for given ID + F-Curve */
-float ANIM_unit_mapping_get_factor(struct Scene *scene, struct ID *id, struct FCurve *fcu, short restore);
+float ANIM_unit_mapping_get_factor(struct Scene *scene, struct ID *id, struct FCurve *fcu, short flag);
/* ------------- Utility macros ----------------------- */