Skip to content

Commit

Permalink
Support necessary export settings to import dynamic heads (#38)
Browse files Browse the repository at this point in the history
* Override with the correct region when grabbing selected object ids from different areas

* Support add_leaf_bones and use_custom_props FBX export settings
  • Loading branch information
othomson-roblox authored Nov 29, 2023
1 parent 7a67a7c commit 85baac6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 22 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,30 @@ class RbxAddonPreferences(AddonPreferences):
soft_max=10.0,
default=1.0, # default: min slope: 0.005, max frame step: 10.
)
add_leaf_bones: BoolProperty(
name="Add Leaf Bones",
description="Append a final bone to the end of each chain to specify last bone length (use this when you intend to edit the armature from exported data)",
default=True,
)
use_custom_props: BoolProperty(
name="Custom Properties",
description="Export Custom Properties",
default=True,
)

def draw(self, context):
self.layout.prop(self, "export_scale")
self.layout.label(text="Include")
include_box = self.layout.box()
include_box.prop(self, "use_custom_props")

self.layout.label(text="Transform")
transform_box = self.layout.box()
transform_box.prop(self, "export_scale")

self.layout.label(text="Armature")
armature_box = self.layout.box()
armature_box.prop(self, "add_leaf_bones")

self.layout.prop(self, "bake_anim", text="Bake Animation")
bake_anim_box = self.layout.box()
bake_anim_box.use_property_split = True
Expand Down
2 changes: 2 additions & 0 deletions lib/export_fbx.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ def export_fbx(scene, view_layer, target_object, exported_file_path, preferences
path_mode="COPY",
embed_textures=True,
use_active_collection=True,
add_leaf_bones=preferences.add_leaf_bones,
use_custom_props=preferences.use_custom_props,
)
finally:
# Return to the previous active LayerCollection
Expand Down

0 comments on commit 85baac6

Please sign in to comment.