diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2021-11-15 18:38:25 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2021-11-16 17:18:06 +0300 |
commit | 287a84b2056700a6d2543000fdaaf9adf1b11caf (patch) | |
tree | d424ad44a7b0c18a419328394604076bf8f1e5c2 | |
parent | e7c2b215bba1dd3b914cb19a35575be9c0050750 (diff) |
FBX Import: fix exception on interleaved armature and other nodes.
If the file contains a parent chain that interleaves nodes with
is_armature true and false, the parent armature may wrongly pick
up meshes owned by the child, causing an exception later. No idea
if such FBX files are valid or malformed, but this is a simple fix.
Differential Revision: https://developer.blender.org/D13224
-rw-r--r-- | io_scene_fbx/__init__.py | 2 | ||||
-rw-r--r-- | io_scene_fbx/import_fbx.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py index a9c58915..07a7b62d 100644 --- a/io_scene_fbx/__init__.py +++ b/io_scene_fbx/__init__.py @@ -21,7 +21,7 @@ bl_info = { "name": "FBX format", "author": "Campbell Barton, Bastien Montagne, Jens Restemeier", - "version": (4, 25, 0), + "version": (4, 26, 0), "blender": (2, 90, 0), "location": "File > Import-Export", "description": "FBX IO meshes, UV's, vertex colors, materials, textures, cameras, lamps and actions", diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py index a07e919e..ee5de9c3 100644 --- a/io_scene_fbx/import_fbx.py +++ b/io_scene_fbx/import_fbx.py @@ -1936,7 +1936,8 @@ class FbxImportHelperNode: for _, m in self.clusters: meshes.update(m) for child in self.children: - child.collect_skeleton_meshes(meshes) + if not child.meshes: + child.collect_skeleton_meshes(meshes) def collect_armature_meshes(self): if self.is_armature: |