Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-09-25 07:20:48 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-25 07:20:48 +0400
commit1edc2417e618c96e62a51c0b499a0e6cf7483a6f (patch)
tree1272118851b26ef85af8ba7326def3a48e0f2227 /io_scene_3ds
parent6b43b039d7f2cb4cbdae7cec6d3d3b58000c26be (diff)
fix [#28405] Importing certain 3DS files takes a very long time
Diffstat (limited to 'io_scene_3ds')
-rw-r--r--io_scene_3ds/import_3ds.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/io_scene_3ds/import_3ds.py b/io_scene_3ds/import_3ds.py
index f39fe0e5..d8ecb12f 100644
--- a/io_scene_3ds/import_3ds.py
+++ b/io_scene_3ds/import_3ds.py
@@ -755,12 +755,16 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH):
putContextMesh(contextMesh_vertls, contextMesh_facels, contextMeshMaterials)
# Assign parents to objects
+ # check _if_ we need to assign first because doing so recalcs the depsgraph
for ind, ob in enumerate(object_list):
parent = object_parent[ind]
if parent == ROOT_OBJECT:
- ob.parent = None
+ if ob.parent is not None:
+ ob.parent = None
else:
- ob.parent = object_list[parent]
+ if ob.parent != object_list[parent]:
+ ob.parent = object_list[parent]
+
# pivot_list[ind] += pivot_list[parent] # XXX, not sure this is correct, should parent space matrix be applied before combining?
# fix pivots
for ind, ob in enumerate(object_list):