]> git.tdb.fi Git - libs/gl.git/commitdiff
Fix exporting of resource-only scenes
authorMikko Rasa <tdb@tdb.fi>
Sun, 4 Sep 2022 10:55:57 +0000 (13:55 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 4 Sep 2022 10:55:57 +0000 (13:55 +0300)
blender/io_mspgl/export.py

index 238f8c4d1725bb9f547632238e1ed488c76b2486..530c83df6e8cb8e1d24a148b0bae8a7c91373210 100644 (file)
@@ -89,6 +89,7 @@ class ProjectExporter:
                task.set_slices(len(ctx.context.blend_data.scenes))
 
                scenes = {}
+               scene_queue = []
                sequences = []
                for s in ctx.context.blend_data.scenes:
                        subtask = task.next_slice(s)
@@ -98,10 +99,12 @@ class ProjectExporter:
                        if s.export_disposition=='SEQUENCE':
                                scene = create_scene_chain(s, scenes)
                                sequences.append(scene)
+                               scene_queue.append(scene)
                        elif s.export_disposition!='IGNORE' and s.name not in scenes:
                                scene = create_scene(s)
+                               scenes[scene.name] = scene
                                if s.export_disposition=='SCENE':
-                                       scenes[scene.name] = scene
+                                       scene_queue.append(scene)
 
                all_objects = []
                for s in scenes.values():
@@ -110,7 +113,6 @@ class ProjectExporter:
                        if s.camera:
                                all_objects.append(s.camera)
 
-               scene_queue = list(scenes.values())
                ordered_scenes = []
                while scene_queue:
                        s = scene_queue.pop(0)