fix: drivers on materials and texture don't update when rendering animation
authorAndrea Weikert <elubie@gmx.net>
Mon, 22 Oct 2012 19:45:16 +0000 (19:45 +0000)
committerAndrea Weikert <elubie@gmx.net>
Mon, 22 Oct 2012 19:45:16 +0000 (19:45 +0000)
* Added additional tag_main_idcode in BKE_scene_update_for_newframe similar to what was done previously in BKE_scene_update_tagged to fix #32017 (unlimited recursion issue for material updates) by Joshua Leung
* So issue wasn't the dependencies, but the material was already tagged (from previous drawing), so wouldn't be updated each frame.

source/blender/blenkernel/intern/scene.c

index dd09094c30c8490fffece9c71ed60b5778efbef1..bc33b9da0936b6bc31fc01282269101289d7297b 100644 (file)
@@ -1117,6 +1117,11 @@ void BKE_scene_update_for_newframe(Main *bmain, Scene *sce, unsigned int lay)
        BKE_animsys_evaluate_all_animation(bmain, sce, ctime);
        /*...done with recusrive funcs */
 
+       /* clear "LIB_DOIT" flag from all materials, to prevent infinite recursion problems later 
+        * when trying to find materials with drivers that need evaluating [#32017] 
+        */
+       tag_main_idcode(bmain, ID_MA, FALSE);
+
        /* BKE_object_handle_update() on all objects, groups and sets */
        scene_update_tagged_recursive(bmain, sce, sce);