[Bf-extensions-cvs] [287a84b2] blender-v3.0-release master: FBX Import: fix exception on interleaved armature and other nodes.

Alexander Gavrilov noreply at git.blender.org
Tue Nov 16 15:21:42 CET 2021


Commit: 287a84b2056700a6d2543000fdaaf9adf1b11caf
Author: Alexander Gavrilov
Date:   Mon Nov 15 18:38:25 2021 +0300
Branches: blender-v3.0-release master
https://developer.blender.org/rBA287a84b2056700a6d2543000fdaaf9adf1b11caf

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

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

M	io_scene_fbx/__init__.py
M	io_scene_fbx/import_fbx.py

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

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:



More information about the Bf-extensions-cvs mailing list