diff options
author | Ton Roosendaal <ton@blender.org> | 2005-09-18 16:24:14 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-09-18 16:24:14 +0400 |
commit | 9e3468bde2ced17f848c37ddd638829801daa335 (patch) | |
tree | 715c47eb8ee23a4d9f7997c628c370901c123277 /source/blender | |
parent | 7c8e636979ef7727435aed00142639667f7d5c42 (diff) |
NLA strips that had an internal repeat, didn't use correct timing to be
rendered with MBlur or Fields.
This is a fix for now, but I've already noticed several pending issues for
Blender's internal time control (time ipos, global time control, startframe
offsets, etc). That's for another time! (pun not intended :)
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/action.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 2dfbf94aa0b..0fee6125f55 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -64,6 +64,7 @@ #include "BLI_blenlib.h" #include "nla.h" +#include "render.h" /* *********************** NOTE ON POSE AND ACTION ********************** @@ -511,6 +512,34 @@ static void rest_pose(bPose *pose, int clearflag) } } +/* ************** time ****************** */ + +/* this now only used for repeating cycles, to enable fields and blur. */ +/* the whole time control in blender needs serious thinking... */ +static float nla_time(float cfra, float unit) +{ + extern float bluroffs; // bad construct, borrowed from object.c for now + + /* 2nd field */ + if(R.flag & R_SEC_FIELD) { + if(R.r.mode & R_FIELDSTILL); else cfra+= 0.5f*unit; + } + + /* motion blur */ + cfra+= unit*bluroffs; + + /* global time */ + cfra*= G.scene->r.framelen; + + + /* decide later... */ +// if(no_speed_curve==0) if(ob && ob->ipo) cfra= calc_ipo_time(ob->ipo, cfra); + + return cfra; +} + +/* ************** do the action ************ */ + void do_all_actions(Object *ob) { bPose *tpose=NULL; @@ -597,7 +626,7 @@ void do_all_actions(Object *ob) striptime = (float)fmod (striptime, 1.0); frametime = (striptime * actlength) + strip->actstart; - extract_pose_from_action (tpose, strip->act, bsystem_time(ob, 0, frametime, 0.0)); + extract_pose_from_action (tpose, strip->act, nla_time(frametime, (float)strip->repeat)); doit=1; } /* Handle extend */ |