diff --git a/io_scene_psk_psa/psk/export/operators.py b/io_scene_psk_psa/psk/export/operators.py index f8460ea..265344c 100644 --- a/io_scene_psk_psa/psk/export/operators.py +++ b/io_scene_psk_psa/psk/export/operators.py @@ -207,7 +207,6 @@ def get_psk_build_options_from_property_group(scene: Scene, pg: PskExportMixin) options.export_space = pg.export_space options.bone_filter_mode = pg.bone_filter_mode options.bone_collection_indices = [PsxBoneCollection(x.armature_object_name, x.armature_data_name, x.index) for x in pg.bone_collection_list if x.is_selected] - options.root_bone_name = pg.root_bone_name options.material_order_mode = pg.material_order_mode options.material_name_list = [x.material_name for x in pg.material_name_list] @@ -309,14 +308,6 @@ class PSK_OT_export_collection(Operator, ExportHelper, PskExportMixin): op = col.operator(PSK_OT_bone_collection_list_select_all.bl_idname, text='', icon='CHECKBOX_DEHLT') op.is_selected = False - advanced_bones_header, advanced_bones_panel = bones_panel.panel('Advanced', default_closed=True) - advanced_bones_header.label(text='Advanced') - if advanced_bones_panel: - flow = advanced_bones_panel.grid_flow(row_major=True) - flow.use_property_split = True - flow.use_property_decorate = False - flow.prop(self, 'root_bone_name') - # Materials materials_header, materials_panel = layout.panel('Materials', default_closed=False) materials_header.label(text='Materials', icon='MATERIAL') @@ -429,13 +420,6 @@ class PSK_OT_export(Operator, ExportHelper): row = bones_panel.row() rows = max(3, min(len(pg.bone_collection_list), 10)) row.template_list('PSX_UL_bone_collection_list', '', pg, 'bone_collection_list', pg, 'bone_collection_list_index', rows=rows) - bones_advanced_header, bones_advanced_panel = bones_panel.panel('Advanced', default_closed=True) - bones_advanced_header.label(text='Advanced') - if bones_advanced_panel: - flow = bones_advanced_panel.grid_flow(row_major=True) - flow.use_property_split = True - flow.use_property_decorate = False - flow.prop(pg, 'root_bone_name') # Materials materials_header, materials_panel = layout.panel('Materials', default_closed=False) diff --git a/io_scene_psk_psa/shared/helpers.py b/io_scene_psk_psa/shared/helpers.py index bf25a44..734a006 100644 --- a/io_scene_psk_psa/shared/helpers.py +++ b/io_scene_psk_psa/shared/helpers.py @@ -332,7 +332,6 @@ class ObjectTree: def create_psx_bones( armature_objects: list[Object], export_space: str = 'WORLD', - root_bone_name: str = 'ROOT', forward_axis: str = 'X', up_axis: str = 'Z', scale: float = 1.0, @@ -517,13 +516,10 @@ def create_psx_bones( bone_name_counts = Counter(bone.psx_bone.name.decode('windows-1252').upper() for bone in bones) for bone_name, count in bone_name_counts.items(): if count > 1: - error_message = f'Found {count} bones with the name "{bone_name}". ' - f'Bone names must be unique when compared case-insensitively.' - - if len(armature_objects) > 1 and bone_name == root_bone_name.upper(): - error_message += f' This is the name of the automatically generated root bone. Consider changing this ' - f'' - raise RuntimeError(error_message) + raise RuntimeError( + f'Found {count} bones with the name "{bone_name}". ' + f'Bone names must be unique when compared case-insensitively.' + ) # Apply the scale to the bone locations. for bone in bones: diff --git a/io_scene_psk_psa/shared/types.pyi b/io_scene_psk_psa/shared/types.pyi index ddf8735..78e8c86 100644 --- a/io_scene_psk_psa/shared/types.pyi +++ b/io_scene_psk_psa/shared/types.pyi @@ -54,7 +54,6 @@ class PsxBoneExportMixin: bone_filter_mode: str bone_collection_list: BpyCollectionProperty[PSX_PG_bone_collection_list_item] bone_collection_list_index: int - root_bone_name: str class PSX_PG_scene_export(TransformSourceMixin):