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:
-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):