feat(importing): Add better FBX bone orientations operator and accessory bone deletion

- Add new `apply_better_fbx_orientations` operator as standalone UI action for applying bone orientations
- Add "Delete Accessory Bones" property and UI toggle in EXTRAS panel for optional bone cleanup
- Move bone orientation logic from `modify_armature` execute method to new dedicated operator
- Refactor accessory bone deletion into separate method callable from new operator
- Update panel UI to show better FBX bones operator with delete accessory bones toggle option
- Register new operator in `__init__.py` and export from modifyarmature module
- Update interface dictionaries (English, Japanese, Chinese) with new UI strings
- Enable better FBX orientations and accessory deletion only for Koikatsu armature (C) selection
- Add detailed logging for bone operation counts and status tracking
This commit is contained in:
2025-12-07 12:47:55 +08:00
parent d8015c348f
commit 63e9a6fb00
11 changed files with 127 additions and 37 deletions

View File

@@ -170,6 +170,11 @@ class PlaceholderProperties(PropertyGroup):
description=t('animation_type_tt'),
default = False)
delete_accessory_bones : BoolProperty(
name="Delete Accessory Bones",
description=t('delete_accessory_bones_tt'),
default = False)
image_dropdown : EnumProperty(
items=(
("A", t('dark_C'), "Use Day LUT to saturate image"),
@@ -378,6 +383,20 @@ class EXTRAS_PT_panel(bpy.types.Panel):
split.label(text=t('rigify_convert'))
split.operator('kkbp.rigifyconvert', text = '', icon='MOD_ARMATURE')
col = box.column(align=True)
row = col.row(align=True)
split = row.split(align=True, factor=splitfac)
split.label(text=t('better_fbx_bones'))
split.operator('kkbp.applybetterfbxorientations', text = '', icon='BONE_DATA')
row.enabled = scene.plugin_state in ['imported'] and scene.armature_dropdown == 'C'
row = col.row(align=True)
split = row.split(align=True, factor=splitfac)
split.label(text="")
split.prop(context.scene.kkbp, "delete_accessory_bones", toggle=True, text = t('delete_accessory_bones'))
row.enabled = scene.plugin_state in ['imported'] and scene.armature_dropdown == 'C'
col = box.column(align=True)
row = col.row(align=True)
split = row.split(align=True, factor=splitfac)