FBX IO: Add support for armature data custom properties #104888

Merged
Thomas Barlow merged 4 commits from Mysteryem/blender-addons:fbx_armature_custom_props_pr into main 2023-09-19 01:53:45 +02:00
Showing only changes of commit e5362d9a3e - Show all commits

View File

@ -560,13 +560,8 @@ def fbx_data_empty_elements(root, empty, scene_data):
null = elem_data_single_int64(root, b"NodeAttribute", get_fbx_uuid_from_key(empty_key)) null = elem_data_single_int64(root, b"NodeAttribute", get_fbx_uuid_from_key(empty_key))
null.add_string(fbx_name_class(empty.name.encode(), b"NodeAttribute")) null.add_string(fbx_name_class(empty.name.encode(), b"NodeAttribute"))
bdata = empty.bdata bdata = empty.bdata
is_armature = bdata.type == 'ARMATURE'
if is_armature:
fbx_type = b"Null"
else:
val = bdata.get('fbx_type', None) val = bdata.get('fbx_type', None)
fbx_type = val.encode() if val and isinstance(val, str) else b"Null" null.add_string(val.encode() if val and isinstance(val, str) else b"Null")
null.add_string(fbx_type)
elem_data_single_string(null, b"TypeFlags", b"Null") elem_data_single_string(null, b"TypeFlags", b"Null")
@ -576,7 +571,7 @@ def fbx_data_empty_elements(root, empty, scene_data):
# Empty/Armature Object custom properties have already been saved with the Model. # Empty/Armature Object custom properties have already been saved with the Model.
# Only Armature data custom properties need to be saved here with the NodeAttribute. # Only Armature data custom properties need to be saved here with the NodeAttribute.
if is_armature: if bdata.type == 'ARMATURE':
fbx_data_element_custom_properties(props, bdata.data) fbx_data_element_custom_properties(props, bdata.data)