[Bf-extensions-cvs] [92ebf635] master: Fix T57632: 3DS Importer Exception when assigning an object as a parent to its self

Philipp Oeser noreply at git.blender.org
Fri Nov 16 14:46:54 CET 2018


Commit: 92ebf635ee2a9ddbc7fbf4a0c06b9732ee555b27
Author: Philipp Oeser
Date:   Fri Nov 16 14:22:59 2018 +0100
Branches: master
https://developer.blender.org/rBA92ebf635ee2a9ddbc7fbf4a0c06b9732ee555b27

Fix T57632: 3DS Importer Exception when assigning an object as a parent
to its self

===================================================================

M	io_scene_3ds/import_3ds.py

===================================================================

diff --git a/io_scene_3ds/import_3ds.py b/io_scene_3ds/import_3ds.py
index 862fe2a7..b9de42d5 100644
--- a/io_scene_3ds/import_3ds.py
+++ b/io_scene_3ds/import_3ds.py
@@ -828,7 +828,10 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH):
                 ob.parent = None
         else:
             if ob.parent != object_list[parent]:
-                ob.parent = object_list[parent]
+                if ob == object_list[parent]:
+                    print('   warning: Cannot assign self to parent ', ob)
+                else:
+                    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



More information about the Bf-extensions-cvs mailing list