diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-11-04 12:06:46 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-11-04 12:06:46 +0400 |
commit | dbc5941caedf4b400b6a65a69e9f4aee1713fe16 (patch) | |
tree | 86e371b942ca7c5127c48f01166a543e7eb1ebab | |
parent | 87cd81b162912e16297eab39d58341aa99125c52 (diff) |
Bugfix [#28515] Dupliframes start/end animation broken since 2.56A
Due to changes with the way that dupliframes were being evaluated (one
of those being that the animation for the object being animated would
get reevaluated for every frame sample for dupliframes) to get them
working properly again sometime during the 2.5 series, the dupliframe-
sampling loop would be prematurely terminated on the first frame in
this example.
That is because after the first step of the loop, the ob->dupend
property would have changed its value as it was being animated,
leading to the loop terminating, and only the a single dupli getting
added.
-rw-r--r-- | source/blender/blenkernel/intern/anim.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index 2ef13318af4..f939c168f51 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -753,6 +753,7 @@ static void frames_duplilist(ListBase *lb, Scene *scene, Object *ob, int level, extern int enable_cu_speed; /* object.c */ Object copyob = {{NULL}}; int cfrao = scene->r.cfra; + int dupend = ob->dupend; /* simple prevention of too deep nested groups */ if (level > MAX_DUPLI_RECUR) return; @@ -773,7 +774,7 @@ static void frames_duplilist(ListBase *lb, Scene *scene, Object *ob, int level, /* duplicate over the required range */ if (ob->transflag & OB_DUPLINOSPEED) enable_cu_speed= 0; - for (scene->r.cfra= ob->dupsta; scene->r.cfra<=ob->dupend; scene->r.cfra++) { + for (scene->r.cfra= ob->dupsta; scene->r.cfra<=dupend; scene->r.cfra++) { short ok= 1; /* - dupoff = how often a frames within the range shouldn't be made into duplis |