Skip to content

Commit

Permalink
Changed fbx exporter to allow for arbitrary custom properties
Browse files Browse the repository at this point in the history
Fixes #356 . But needs testing.

This should also allow users to set the highlighttype for highlight empties as described in #336 .
  • Loading branch information
enenra committed Jun 26, 2023
1 parent 6b190a1 commit 7e307cf
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions space-engineers-utilities/export/seut_custom_fbx_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,9 @@ def fbx_data_object_elements(root, ob_obj, scene_data):
"""
if obj_type == b"Empty":
se_custom_property_file = ob_obj.bdata.get('file', None)
se_custom_property_highlight = ob_obj.bdata.get('highlight', None)

if se_custom_property_file is not None:
_fbx.elem_props_template_set(tmpl, props, "p_string", b"file", str(se_custom_property_file))

if se_custom_property_highlight is not None:
# HARAG: TODO SE supports mutliple highlight shapes via <objectSPECIFICATION1>;<objectSPECIFICATION2>;...
_fbx.elem_props_template_set(tmpl, props, "p_string", b"highlight", str(se_custom_property_highlight))
for key in ob_obj.bdata.keys():
if key not in '_RNA_UI' and key != 'seut':
_fbx.elem_props_template_set(tmpl, props, "p_string", bytes(key, 'utf-8'), str(ob_obj.bdata.get(key, None)))

if obj_type == b"Mesh" and ob_obj.bdata.rigid_body:
rbo = ob_obj.bdata.rigid_body
Expand Down

0 comments on commit 7e307cf

Please sign in to comment.