From dbc5941caedf4b400b6a65a69e9f4aee1713fe16 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Fri, 4 Nov 2011 08:06:46 +0000 Subject: 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. --- source/blender/blenkernel/intern/anim.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel') 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 -- cgit v1.2.3