mirror of
https://github.com/DarklightGames/io_scene_psk_psa.git
synced 2024-11-28 00:20:48 +01:00
The PSK export operator now uses the new Blender 4.1 panels instead of the layout boxes
This commit is contained in:
parent
d107a56007
commit
c7b23e8c0d
@ -121,15 +121,17 @@ class PSK_OT_export(Operator, ExportHelper):
|
|||||||
pg = getattr(context.scene, 'psk_export')
|
pg = getattr(context.scene, 'psk_export')
|
||||||
|
|
||||||
# MESH
|
# MESH
|
||||||
box = layout.box()
|
mesh_header, mesh_panel = layout.panel('01_mesh', default_closed=False)
|
||||||
box.label(text='Mesh', icon='MESH_DATA')
|
mesh_header.label(text='Mesh', icon='MESH_DATA')
|
||||||
box.prop(pg, 'use_raw_mesh_data')
|
if mesh_panel:
|
||||||
|
mesh_panel.prop(pg, 'use_raw_mesh_data')
|
||||||
|
|
||||||
# BONES
|
# BONES
|
||||||
box = layout.box()
|
bones_header, bones_panel = layout.panel('02_bones', default_closed=False)
|
||||||
box.label(text='Bones', icon='BONE_DATA')
|
bones_header.label(text='Bones', icon='BONE_DATA')
|
||||||
|
if bones_panel:
|
||||||
bone_filter_mode_items = pg.bl_rna.properties['bone_filter_mode'].enum_items_static
|
bone_filter_mode_items = pg.bl_rna.properties['bone_filter_mode'].enum_items_static
|
||||||
row = box.row(align=True)
|
row = bones_panel.row(align=True)
|
||||||
for item in bone_filter_mode_items:
|
for item in bone_filter_mode_items:
|
||||||
identifier = item.identifier
|
identifier = item.identifier
|
||||||
item_layout = row.row(align=True)
|
item_layout = row.row(align=True)
|
||||||
@ -137,16 +139,17 @@ class PSK_OT_export(Operator, ExportHelper):
|
|||||||
item_layout.enabled = is_bone_filter_mode_item_available(context, identifier)
|
item_layout.enabled = is_bone_filter_mode_item_available(context, identifier)
|
||||||
|
|
||||||
if pg.bone_filter_mode == 'BONE_COLLECTIONS':
|
if pg.bone_filter_mode == 'BONE_COLLECTIONS':
|
||||||
row = box.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)
|
||||||
|
|
||||||
box.prop(pg, 'should_enforce_bone_name_restrictions')
|
bones_panel.prop(pg, 'should_enforce_bone_name_restrictions')
|
||||||
|
|
||||||
# MATERIALS
|
# MATERIALS
|
||||||
box = layout.box()
|
materials_header, materials_panel = layout.panel('03_materials', default_closed=False)
|
||||||
box.label(text='Materials', icon='MATERIAL')
|
materials_header.label(text='Materials', icon='MATERIAL')
|
||||||
row = box.row()
|
if materials_panel:
|
||||||
|
row = materials_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('PSK_UL_materials', '', pg, 'material_list', pg, 'material_list_index', rows=rows)
|
row.template_list('PSK_UL_materials', '', pg, 'material_list', pg, 'material_list_index', rows=rows)
|
||||||
col = row.column(align=True)
|
col = row.column(align=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user