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:
authorCampbell Barton <ideasman42@gmail.com>2010-04-02 17:43:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-04-02 17:43:56 +0400
commit70540fca3bfa90d21531c84e42aa7a4f74b52826 (patch)
tree76f2c208a472e2014b4a2bcaabe28c1dee2793f2 /source/blender/blenkernel/intern/scene.c
parente27fbba217d768701241598ba072b703060da225 (diff)
bugfix [#21230] set-scene animation updates not working
fix for empty scenes with SETLOOPER macro.
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r--source/blender/blenkernel/intern/scene.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index a494d947953..c258f2d47b7 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1051,3 +1051,26 @@ float get_render_aosss_error(RenderData *r, float error)
return error;
}
+/* helper function for the SETLOOPER macro */
+Base *_setlooper_base_step(Scene **sce, Base *base)
+{
+ if(base && base->next) {
+ /* common case, step to the next */
+ return base->next;
+ }
+ else if(base==NULL && (*sce)->base.first) {
+ /* first time looping, return the scenes first base */
+ return (Base *)(*sce)->base.first;
+ }
+ else {
+ /* reached the end, get the next base in the set */
+ while((*sce= (*sce)->set)) {
+ base= (Base *)(*sce)->base.first;
+ if(base) {
+ return base;
+ }
+ }
+ }
+
+ return NULL;
+}