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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-06-24 13:51:59 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-06-24 13:51:59 +0300
commit2b6a7563ac4db60d02c9530c4d1870ea8c3a6a0e (patch)
tree1df97348527a7624d79ce8345648d18ea4f6f299 /io_scene_fbx/import_fbx.py
parentb196c481d2eda932832daf4f65a68c80a8bdad5e (diff)
Fix T48713: Problem when importing FBX file with 2 armatures.
Yet another case of the infamous 'iterating over something while modifying it' issue. Here, setting parent of a node actually modifies the children list of its previous parent, which resulted in missed items in the iteration.
Diffstat (limited to 'io_scene_fbx/import_fbx.py')
-rw-r--r--io_scene_fbx/import_fbx.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py
index ca3a06e1..4055a3b0 100644
--- a/io_scene_fbx/import_fbx.py
+++ b/io_scene_fbx/import_fbx.py
@@ -1677,11 +1677,12 @@ class FbxImportHelperNode:
armature = self
else:
# otherwise insert a new node
+ # XXX Maybe in case self is virtual FBX root node, we should instead add one armature per bone child?
armature = FbxImportHelperNode(None, None, None, False)
armature.fbx_name = "Armature"
armature.is_armature = True
- for child in self.children:
+ for child in tuple(self.children):
if child.is_bone:
child.parent = armature