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-28 11:32:00 +0400
committerJoshua Leung <aligorith@gmail.com>2009-06-28 11:32:00 +0400
commitaa4ed13e4a216a3464f7b9d6643c195927aea98a (patch)
tree89da0c36092b7cea3a17163104dac2e46fd3d58a /source/blender/editors/space_graph
parent500507ddb1efdf9f69d8a61e3d03a855ee017902 (diff)
NLA SoC: NLA Mapping Cleanup
While trying to fix the mapping conversions for repeat, I came across some limitations with the current (soon to be previous) mapping methods. Now the mapping conversions should work nicely for all places that use them.
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r--source/blender/editors/space_graph/graph_edit.c8
-rw-r--r--source/blender/editors/space_graph/graph_select.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index fc04308077c..e38c24ed223 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -123,8 +123,8 @@ static void get_graph_keyframe_extents (bAnimContext *ac, float *xmin, float *xm
calc_fcurve_bounds(fcu, &txmin, &txmax, &tymin, &tymax);
if (adt) {
- txmin= BKE_nla_tweakedit_remap(adt, txmin, 1);
- txmax= BKE_nla_tweakedit_remap(adt, txmax, 1);
+ txmin= BKE_nla_tweakedit_remap(adt, txmin, NLATIME_CONVERT_MAP);
+ txmax= BKE_nla_tweakedit_remap(adt, txmax, NLATIME_CONVERT_MAP);
}
/* try to set cur using these values, if they're more extreme than previously set values */
@@ -288,7 +288,7 @@ static void create_ghost_curves (bAnimContext *ac, int start, int end)
/* use the sampling callback at 1-frame intervals from start to end frames */
for (cfra= start; cfra <= end; cfra++, fpt++) {
- float cfrae= BKE_nla_tweakedit_remap(adt, cfra, 0);
+ float cfrae= BKE_nla_tweakedit_remap(adt, cfra, NLATIME_CONVERT_UNMAP);
fpt->vec[0]= cfrae;
fpt->vec[1]= fcurve_samplingcb_evalcurve(fcu, NULL, cfrae);
@@ -427,7 +427,7 @@ static int graphkeys_click_insert_exec (bContext *C, wmOperator *op)
/* apply inverse NLA-mapping to frame to get correct time in un-scaled action */
adt= ANIM_nla_mapping_get(&ac, ale);
- frame= BKE_nla_tweakedit_remap(adt, frame, 0);
+ frame= BKE_nla_tweakedit_remap(adt, frame, NLATIME_CONVERT_UNMAP);
/* insert keyframe on the specified frame + value */
insert_vert_fcurve((FCurve *)ale->data, frame, val, 0);
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c
index d600396fd77..afe66ed179e 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -238,8 +238,8 @@ static void borderselect_graphkeys (bAnimContext *ac, rcti rect, short mode, sho
if (mode != BEZT_OK_VALUERANGE) {
/* if channel is mapped in NLA, apply correction */
if (adt) {
- bed.f1= BKE_nla_tweakedit_remap(adt, rectf.xmin, 0);
- bed.f2= BKE_nla_tweakedit_remap(adt, rectf.xmax, 0);
+ bed.f1= BKE_nla_tweakedit_remap(adt, rectf.xmin, NLATIME_CONVERT_UNMAP);
+ bed.f2= BKE_nla_tweakedit_remap(adt, rectf.xmax, NLATIME_CONVERT_UNMAP);
}
else {
bed.f1= rectf.xmin;
@@ -459,7 +459,7 @@ static void columnselect_graph_keys (bAnimContext *ac, short mode)
for (ce= bed.list.first; ce; ce= ce->next) {
/* set frame for validation callback to refer to */
if (ale)
- bed.f1= BKE_nla_tweakedit_remap(adt, ce->cfra, 0);
+ bed.f1= BKE_nla_tweakedit_remap(adt, ce->cfra, NLATIME_CONVERT_UNMAP);
else
bed.f1= ce->cfra;
@@ -841,7 +841,7 @@ static void graphkeys_mselect_column (bAnimContext *ac, int mval[2], short selec
/* set frame for validation callback to refer to */
if (adt)
- bed.f1= BKE_nla_tweakedit_remap(adt, selx, 0);
+ bed.f1= BKE_nla_tweakedit_remap(adt, selx, NLATIME_CONVERT_UNMAP);
else
bed.f1= selx;