Removed "Root Bone Name" property since it is no longer used
This commit is contained in:
@@ -207,7 +207,6 @@ def get_psk_build_options_from_property_group(scene: Scene, pg: PskExportMixin)
|
|||||||
options.export_space = pg.export_space
|
options.export_space = pg.export_space
|
||||||
options.bone_filter_mode = pg.bone_filter_mode
|
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.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_order_mode = pg.material_order_mode
|
||||||
options.material_name_list = [x.material_name for x in pg.material_name_list]
|
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 = col.operator(PSK_OT_bone_collection_list_select_all.bl_idname, text='', icon='CHECKBOX_DEHLT')
|
||||||
op.is_selected = False
|
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
|
||||||
materials_header, materials_panel = layout.panel('Materials', default_closed=False)
|
materials_header, materials_panel = layout.panel('Materials', default_closed=False)
|
||||||
materials_header.label(text='Materials', icon='MATERIAL')
|
materials_header.label(text='Materials', icon='MATERIAL')
|
||||||
@@ -429,13 +420,6 @@ class PSK_OT_export(Operator, ExportHelper):
|
|||||||
row = bones_panel.row()
|
row = bones_panel.row()
|
||||||
rows = max(3, min(len(pg.bone_collection_list), 10))
|
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)
|
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
|
||||||
materials_header, materials_panel = layout.panel('Materials', default_closed=False)
|
materials_header, materials_panel = layout.panel('Materials', default_closed=False)
|
||||||
|
|||||||
@@ -332,7 +332,6 @@ class ObjectTree:
|
|||||||
def create_psx_bones(
|
def create_psx_bones(
|
||||||
armature_objects: list[Object],
|
armature_objects: list[Object],
|
||||||
export_space: str = 'WORLD',
|
export_space: str = 'WORLD',
|
||||||
root_bone_name: str = 'ROOT',
|
|
||||||
forward_axis: str = 'X',
|
forward_axis: str = 'X',
|
||||||
up_axis: str = 'Z',
|
up_axis: str = 'Z',
|
||||||
scale: float = 1.0,
|
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)
|
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():
|
for bone_name, count in bone_name_counts.items():
|
||||||
if count > 1:
|
if count > 1:
|
||||||
error_message = f'Found {count} bones with the name "{bone_name}". '
|
raise RuntimeError(
|
||||||
|
f'Found {count} bones with the name "{bone_name}". '
|
||||||
f'Bone names must be unique when compared case-insensitively.'
|
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)
|
|
||||||
|
|
||||||
# Apply the scale to the bone locations.
|
# Apply the scale to the bone locations.
|
||||||
for bone in bones:
|
for bone in bones:
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ class PsxBoneExportMixin:
|
|||||||
bone_filter_mode: str
|
bone_filter_mode: str
|
||||||
bone_collection_list: BpyCollectionProperty[PSX_PG_bone_collection_list_item]
|
bone_collection_list: BpyCollectionProperty[PSX_PG_bone_collection_list_item]
|
||||||
bone_collection_list_index: int
|
bone_collection_list_index: int
|
||||||
root_bone_name: str
|
|
||||||
|
|
||||||
|
|
||||||
class PSX_PG_scene_export(TransformSourceMixin):
|
class PSX_PG_scene_export(TransformSourceMixin):
|
||||||
|
|||||||
Reference in New Issue
Block a user