Fix #105045: Error importing FBX custom properties on placeholder PoseBones #105053
@ -5,7 +5,7 @@
|
|||||||
bl_info = {
|
bl_info = {
|
||||||
"name": "FBX format",
|
"name": "FBX format",
|
||||||
"author": "Campbell Barton, Bastien Montagne, Jens Restemeier, @Mysteryem",
|
"author": "Campbell Barton, Bastien Montagne, Jens Restemeier, @Mysteryem",
|
||||||
"version": (5, 8, 13),
|
"version": (5, 8, 14),
|
||||||
"blender": (4, 0, 0),
|
"blender": (4, 0, 0),
|
||||||
"location": "File > Import-Export",
|
"location": "File > Import-Export",
|
||||||
"description": "FBX IO meshes, UVs, vertex colors, materials, textures, cameras, lamps and actions",
|
"description": "FBX IO meshes, UVs, vertex colors, materials, textures, cameras, lamps and actions",
|
||||||
|
@ -2742,7 +2742,13 @@ class FbxImportHelperNode:
|
|||||||
pose_bone = arm.bl_obj.pose.bones[self.bl_bone]
|
pose_bone = arm.bl_obj.pose.bones[self.bl_bone]
|
||||||
pose_bone.matrix_basis = self.get_bind_matrix().inverted_safe() @ self.get_matrix()
|
pose_bone.matrix_basis = self.get_bind_matrix().inverted_safe() @ self.get_matrix()
|
||||||
|
|
||||||
if settings.use_custom_props:
|
# `self.fbx_elem` can be `None` in cases where the imported hierarchy contains a mix of bone and non-bone FBX
|
||||||
|
# Nodes parented to one another, e.g. "bone1"->"mesh1"->"bone2". In Blender, an Armature can only consist of
|
||||||
|
# bones, so to maintain the imported hierarchy, a placeholder bone with the same name as "mesh1" is inserted
|
||||||
|
# into the Armature and then the imported "mesh1" Object is parented to the placeholder bone. The placeholder
|
||||||
|
# bone won't have a `self.fbx_elem` because it belongs to the "mesh1" Object instead.
|
||||||
|
# See FbxImportHelperNode.find_fake_bones().
|
||||||
|
if settings.use_custom_props and self.fbx_elem:
|
||||||
blen_read_custom_properties(self.fbx_elem, pose_bone, settings)
|
blen_read_custom_properties(self.fbx_elem, pose_bone, settings)
|
||||||
|
|
||||||
for child in self.children:
|
for child in self.children:
|
||||||
|
Loading…
Reference in New Issue
Block a user