diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-05-03 15:46:57 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-05-03 15:46:57 +0400 |
commit | ab3339f3801dcaedff8d4758c40c612cc65e86c9 (patch) | |
tree | 3bf85f0e0abc24970ab2a2177218eb23a2204a54 /source/blender/blenkernel/intern/action.c | |
parent | 1d03db80d5038fcd5fc824fa6ba358218244a561 (diff) |
NLA SoC: Initial commit of changes for the way NLA is evaluated
* Recoded the flags for NLA-Strips to take into account the new design directions
* Modified parts of the evaluation pipeline to reflect this
Diffstat (limited to 'source/blender/blenkernel/intern/action.c')
-rw-r--r-- | source/blender/blenkernel/intern/action.c | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index d54bc749b71..f2e3583c87b 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -717,45 +717,25 @@ static bActionStrip *get_active_strip(Object *ob) return NULL; } -/* non clipped mapping of strip */ -static float get_actionstrip_frame(bActionStrip *strip, float cframe, int invert) -{ - float length, actlength, repeat, scale; - - if (strip->repeat == 0.0f) strip->repeat = 1.0f; - repeat = (strip->flag & ACTSTRIP_USESTRIDE) ? (1.0f) : (strip->repeat); - - if (strip->scale == 0.0f) strip->scale= 1.0f; - scale = (float)fabs(strip->scale); /* scale must be positive (for now) */ - - actlength = strip->actend-strip->actstart; - if (actlength == 0.0f) actlength = 1.0f; - length = repeat * scale * actlength; - - /* invert = convert action-strip time to global time */ - if (invert) - return length*(cframe - strip->actstart)/(repeat*actlength) + strip->start; - else - return repeat*actlength*(cframe - strip->start)/length + strip->actstart; -} - /* if the conditions match, it converts current time to strip time */ +// TODO: change this adt float get_action_frame(Object *ob, float cframe) { bActionStrip *strip= get_active_strip(ob); - if(strip) - return get_actionstrip_frame(strip, cframe, 0); + //if(strip) + // return get_actionstrip_frame(strip, cframe, 0); return cframe; } /* inverted, strip time to current time */ +// TODO: change this to adt float get_action_frame_inv(Object *ob, float cframe) { bActionStrip *strip= get_active_strip(ob); - if(strip) - return get_actionstrip_frame(strip, cframe, 1); + //if(strip) + // return get_actionstrip_frame(strip, cframe, 1); return cframe; } |