X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=blender%2Fio_mspgl%2Fexport.py;h=b724eddd4f8c071953cad9dc1c7c9cb38a24cc59;hb=HEAD;hp=238f8c4d1725bb9f547632238e1ed488c76b2486;hpb=6c881bc1ee3c0af5c1bb4b3794dcb23ba096ac12;p=libs%2Fgl.git diff --git a/blender/io_mspgl/export.py b/blender/io_mspgl/export.py index 238f8c4d..b724eddd 100644 --- a/blender/io_mspgl/export.py +++ b/blender/io_mspgl/export.py @@ -2,7 +2,7 @@ import os class DataExporter: def export_to_file(self, ctx, out_fn, *, collection=False, shared_resources=False): - objects = context.context.selected_objects + objects = ctx.context.selected_objects resources = {} @@ -89,19 +89,19 @@ 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) - if s.export_disposition=='IGNORE': - continue - 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 +110,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) @@ -139,6 +138,7 @@ class ProjectExporter: resources[scene_name] = scene_res dummy_res.create_reference_statement("ref", scene_res) + task = ctx.task("Exporting sequences", 1.0) for s in sequences: subtask = task.task(s, 0.5) seq_name = s.name+".seq"