diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py index 382553bad17308d7fec5ac7c480771bb302f74a0..9257056cb52fa21dee84e089da3ba9c7755ddfde 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, 18, 1), + "version": (4, 19, 0), "blender": (2, 81, 6), "location": "File > Import-Export", "description": "FBX IO meshes, UV's, vertex colors, materials, textures, cameras, lamps and actions", diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py index b852adaa67daf5c5290548b04a5f433e03d102fc..d1ba96bbed69a31fe4e7153b95be75eae1b6984f 100644 --- a/io_scene_fbx/export_fbx_bin.py +++ b/io_scene_fbx/export_fbx_bin.py @@ -1686,7 +1686,9 @@ def fbx_data_object_elements(root, ob_obj, scene_data): # Custom properties. if scene_data.settings.use_custom_props: - fbx_data_element_custom_properties(props, ob_obj.bdata) + # Here we want customprops from the 'pose' bone, not the 'edit' bone... + bdata = ob_obj.bdata_pose_bone if ob_obj.is_bone else ob_obj.bdata + fbx_data_element_custom_properties(props, bdata) # Those settings would obviously need to be edited in a complete version of the exporter, may depends on # object type, etc. diff --git a/io_scene_fbx/fbx_utils.py b/io_scene_fbx/fbx_utils.py index a496075dc19a7161c1e15a422d65cb3e43243a72..f71e89a8153171e642a9959c16d7be972bc57756 100644 --- a/io_scene_fbx/fbx_utils.py +++ b/io_scene_fbx/fbx_utils.py @@ -1007,6 +1007,12 @@ class ObjectWrapper(metaclass=MetaObjectWrapper): return ObjectWrapper(self.bdata.parent, self._ref) or ObjectWrapper(self._ref) parent = property(get_parent) + def get_bdata_pose_bone(self): + if self._tag == 'BO': + return self._ref.pose.bones[self.bdata.name] + return None + bdata_pose_bone = property(get_bdata_pose_bone) + def get_matrix_local(self): if self._tag == 'OB': return self.bdata.matrix_local.copy()