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/transform
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/transform')
-rw-r--r--source/blender/editors/transform/transform_conversions.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 41d04c85f44..573c4f15657 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -3714,12 +3714,14 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
float mtx[3][3], smtx[3][3];
const bool use_handle = !(sipo->flag & SIPO_NOHANDLES);
const bool use_local_center = checkUseLocalCenter_GraphEdit(t);
- const short anim_map_flag = ANIM_UNITCONV_ONLYSEL | ANIM_UNITCONV_SELVERTS;
+ short anim_map_flag = ANIM_UNITCONV_ONLYSEL | ANIM_UNITCONV_SELVERTS;
/* determine what type of data we are operating on */
if (ANIM_animdata_get_context(C, &ac) == 0)
return;
-
+
+ anim_map_flag |= ANIM_get_normalization_flags(&ac);
+
/* filter data */
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVE_VISIBLE);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
@@ -3854,8 +3856,8 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
copy_m3_m3(scaled_mtx, mtx);
copy_m3_m3(scaled_smtx, smtx);
- mul_v3_fl(scaled_mtx[1], 1.0f / unit_scale);
- mul_v3_fl(scaled_smtx[1], unit_scale);
+ mul_v3_fl(scaled_mtx[1], unit_scale);
+ mul_v3_fl(scaled_smtx[1], 1.0f / unit_scale);
/* only include BezTriples whose 'keyframe' occurs on the same side of the current frame as mouse (if applicable) */
for (i = 0, bezt = fcu->bezt; i < fcu->totvert; i++, bezt++) {
@@ -5861,6 +5863,9 @@ int special_transform_moving(TransInfo *t)
if (t->spacetype == SPACE_SEQ) {
return G_TRANSFORM_SEQ;
}
+ else if (t->spacetype == SPACE_IPO) {
+ return G_TRANSFORM_FCURVES;
+ }
else if (t->obedit || ((t->flag & T_POSE) && (t->poseobj))) {
return G_TRANSFORM_EDIT;
}