From 50bbabdc0485b3d75eabaef27e21c91556fd73b4 Mon Sep 17 00:00:00 2001
From: Campbell Barton <ideasman42@gmail.com>
Date: Tue, 7 Jun 2011 08:41:33 +0000
Subject: [PATCH] export objects in predictable order

---
 io_scene_x3d/export_x3d.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py
index 56a597524..5a18c16b1 100644
--- a/io_scene_x3d/export_x3d.py
+++ b/io_scene_x3d/export_x3d.py
@@ -92,7 +92,7 @@ def build_hierarchy(objects):
             parent = parent.parent
         return parent
 
-    for obj in objects_set:
+    for obj in objects:
         par_lookup.setdefault(test_parent(obj.parent), []).append((obj, []))
 
     for parent, children in par_lookup.items():
@@ -1181,9 +1181,9 @@ def export(file,
         ident = '\t\t'
 
         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:
-            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:
             objects_hierarchy = build_hierarchy(objects)
-- 
GitLab