Skip to content
Snippets Groups Projects
Commit 50bbabdc authored by Campbell Barton's avatar Campbell Barton
Browse files

export objects in predictable order

parent dee6d90d
No related branches found
No related tags found
No related merge requests found
...@@ -92,7 +92,7 @@ def build_hierarchy(objects): ...@@ -92,7 +92,7 @@ def build_hierarchy(objects):
parent = parent.parent parent = parent.parent
return parent return parent
for obj in objects_set: for obj in objects:
par_lookup.setdefault(test_parent(obj.parent), []).append((obj, [])) par_lookup.setdefault(test_parent(obj.parent), []).append((obj, []))
for parent, children in par_lookup.items(): for parent, children in par_lookup.items():
...@@ -1181,9 +1181,9 @@ def export(file, ...@@ -1181,9 +1181,9 @@ def export(file,
ident = '\t\t' ident = '\t\t'
if use_selection: if use_selection:
objects = (obj for obj in scene.objects if obj.is_visible(scene) and o.select) objects = [obj for obj in scene.objects if obj.is_visible(scene) and o.select]
else: else:
objects = (obj for obj in scene.objects if obj.is_visible(scene)) objects = [obj for obj in scene.objects if obj.is_visible(scene)]
if use_hierarchy: if use_hierarchy:
objects_hierarchy = build_hierarchy(objects) objects_hierarchy = build_hierarchy(objects)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment