Merge branch 'master' into feature-original-sequence-names
# Conflicts: # io_scene_psk_psa/psa/exporter.py
This commit is contained in:
@@ -78,8 +78,10 @@ def register():
|
|||||||
|
|
||||||
|
|
||||||
def unregister():
|
def unregister():
|
||||||
del bpy.types.Scene.psa_export
|
|
||||||
del bpy.types.Scene.psa_import
|
del bpy.types.Scene.psa_import
|
||||||
|
del bpy.types.Scene.psk_import
|
||||||
|
del bpy.types.Scene.psa_export
|
||||||
|
del bpy.types.Scene.psk_export
|
||||||
bpy.types.TOPBAR_MT_file_export.remove(psk_export_menu_func)
|
bpy.types.TOPBAR_MT_file_export.remove(psk_export_menu_func)
|
||||||
bpy.types.TOPBAR_MT_file_import.remove(psk_import_menu_func)
|
bpy.types.TOPBAR_MT_file_import.remove(psk_import_menu_func)
|
||||||
bpy.types.TOPBAR_MT_file_export.remove(psa_export_menu_func)
|
bpy.types.TOPBAR_MT_file_export.remove(psa_export_menu_func)
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class PsaBuilder(object):
|
|||||||
# Ensure that the exported hierarchy has a single root bone.
|
# Ensure that the exported hierarchy has a single root bone.
|
||||||
root_bones = [x for x in bones if x.parent is None]
|
root_bones = [x for x in bones if x.parent is None]
|
||||||
if len(root_bones) > 1:
|
if len(root_bones) > 1:
|
||||||
root_bone_names = [x.name for x in bones]
|
root_bone_names = [x.name for x in root_bones]
|
||||||
raise RuntimeError('Exported bone hierarchy must have a single root bone.'
|
raise RuntimeError('Exported bone hierarchy must have a single root bone.'
|
||||||
f'The bone hierarchy marked for export has {len(root_bones)} root bones: {root_bone_names}')
|
f'The bone hierarchy marked for export has {len(root_bones)} root bones: {root_bone_names}')
|
||||||
|
|
||||||
|
|||||||
@@ -140,8 +140,7 @@ class PsaExportOperator(Operator, ExportHelper):
|
|||||||
|
|
||||||
if pg.bone_filter_mode == 'BONE_GROUPS':
|
if pg.bone_filter_mode == 'BONE_GROUPS':
|
||||||
rows = max(3, min(len(pg.bone_group_list), 10))
|
rows = max(3, min(len(pg.bone_group_list), 10))
|
||||||
layout.template_list('PSX_UL_BoneGroupList', '', pg, 'bone_group_list', pg,
|
layout.template_list('PSX_UL_BoneGroupList', '', pg, 'bone_group_list', pg, 'bone_group_list_index', rows=rows)
|
||||||
'bone_group_list_index', rows=rows)
|
|
||||||
|
|
||||||
def is_action_for_armature(self, action):
|
def is_action_for_armature(self, action):
|
||||||
if len(action.fcurves) == 0:
|
if len(action.fcurves) == 0:
|
||||||
|
|||||||
@@ -257,10 +257,10 @@ class PSA_UL_SequenceList(UIList):
|
|||||||
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
|
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
split = row.split(align=True, factor=0.75)
|
split = row.split(align=True, factor=0.75)
|
||||||
action_col = split.row(align=True)
|
column = split.row(align=True)
|
||||||
action_col.alignment = 'LEFT'
|
column.alignment = 'LEFT'
|
||||||
action_col.prop(item, 'is_selected', icon_only=True)
|
column.prop(item, 'is_selected', icon_only=True)
|
||||||
action_col.label(text=item.action_name)
|
column.label(text=item.action_name)
|
||||||
|
|
||||||
def draw_filter(self, context, layout):
|
def draw_filter(self, context, layout):
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ class PskBuilder(object):
|
|||||||
print('root bones')
|
print('root bones')
|
||||||
print(root_bones)
|
print(root_bones)
|
||||||
if len(root_bones) > 1:
|
if len(root_bones) > 1:
|
||||||
root_bone_names = [x.name for x in bones]
|
root_bone_names = [x.name for x in root_bones]
|
||||||
raise RuntimeError('Exported bone hierarchy must have a single root bone.'
|
raise RuntimeError('Exported bone hierarchy must have a single root bone.'
|
||||||
f'The bone hierarchy marked for export has {len(root_bones)} root bones: {root_bone_names}')
|
f'The bone hierarchy marked for export has {len(root_bones)} root bones: {root_bone_names}')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user