1
0
mirror of https://github.com/DarklightGames/io_scene_psk_psa.git synced 2024-11-15 02:37:39 +01:00

Fixed the options of many properties to not be ANIMATABLE

This commit is contained in:
Colin Basnett 2022-03-05 13:43:24 -08:00
parent 04503ed282
commit eb7a497010
4 changed files with 50 additions and 17 deletions

View File

@ -70,6 +70,7 @@ def should_use_original_sequence_names_updated(property, context):
class PsaExportPropertyGroup(PropertyGroup):
sequence_source: EnumProperty(
name='Source',
options=set(),
description='',
items=(
('ACTIONS', 'Actions', 'Sequences will be exported using actions'),
@ -82,18 +83,33 @@ class PsaExportPropertyGroup(PropertyGroup):
marker_list_index: IntProperty(default=0)
bone_filter_mode: EnumProperty(
name='Bone Filter',
options=set(),
description='',
items=(
('ALL', 'All', 'All bones will be exported.'),
('BONE_GROUPS', 'Bone Groups', 'Only bones belonging to the selected bone groups and their ancestors will be exported.'),
('BONE_GROUPS', 'Bone Groups', 'Only bones belonging to the selected bone groups and their ancestors will '
'be exported.'),
)
)
bone_group_list: CollectionProperty(type=BoneGroupListItem)
bone_group_list_index: IntProperty(default=0, name='', description='')
should_use_original_sequence_names: BoolProperty(default=False, name='Original Names', description='If the action was imported from the PSA Import panel, the original name of the sequence will be used instead of the Blender action name', update=should_use_original_sequence_names_updated)
should_trim_timeline_marker_sequences: BoolProperty(default=True, name='Trim Sequences', description='Frames without NLA track information at the boundaries of timeline markers will be excluded from the exported sequences')
sequence_name_prefix: StringProperty(name='Prefix')
sequence_name_suffix: StringProperty(name='Suffix')
should_use_original_sequence_names: BoolProperty(
default=False,
name='Original Names',
options=set(),
update=should_use_original_sequence_names_updated,
description='If the action was imported from the PSA Import panel, the original name of the sequence will be '
'used instead of the Blender action name',
)
should_trim_timeline_marker_sequences: BoolProperty(
default=True,
name='Trim Sequences',
options=set(),
description='Frames without NLA track information at the boundaries of timeline markers will be excluded from '
'the exported sequences '
)
sequence_name_prefix: StringProperty(name='Prefix', options=set())
sequence_name_suffix: StringProperty(name='Suffix', options=set())
def is_bone_filter_mode_item_available(context, identifier):

View File

@ -200,8 +200,8 @@ class PsaImporter(object):
class PsaImportActionListItem(PropertyGroup):
action_name: StringProperty()
is_selected: BoolProperty(default=False)
action_name: StringProperty(options=set())
is_selected: BoolProperty(default=False, options=set())
def load_psa_file(context):
@ -229,7 +229,7 @@ def on_psa_file_path_updated(property, context):
class PsaBonePropertyGroup(PropertyGroup):
bone_name: StringProperty()
bone_name: StringProperty(options=set())
class PsaDataPropertyGroup(PropertyGroup):
@ -238,18 +238,18 @@ class PsaDataPropertyGroup(PropertyGroup):
class PsaImportPropertyGroup(PropertyGroup):
psa_file_path: StringProperty(default='', update=on_psa_file_path_updated, name='PSA File Path')
psa_file_path: StringProperty(default='', options=set(), update=on_psa_file_path_updated, name='PSA File Path')
psa_error: StringProperty(default='')
psa: PointerProperty(type=PsaDataPropertyGroup)
sequence_list: CollectionProperty(type=PsaImportActionListItem)
sequence_list_index: IntProperty(name='', default=0)
action_list: CollectionProperty(type=PsaImportActionListItem)
action_list_index: IntProperty(name='', default=0)
should_clean_keys: BoolProperty(default=True, name='Clean Keyframes', description='Exclude unnecessary keyframes from being written to the actions.')
should_use_fake_user: BoolProperty(default=True, name='Fake User', description='Assign each imported action a fake user so that the data block is saved even it has no users.')
should_stash: BoolProperty(default=False, name='Stash', description='Stash each imported action as a strip on a new non-contributing NLA track')
should_use_action_name_prefix: BoolProperty(default=False, name='Prefix Action Name')
action_name_prefix: StringProperty(default='', name='Prefix')
should_clean_keys: BoolProperty(default=True, name='Clean Keyframes', description='Exclude unnecessary keyframes from being written to the actions.', options=set())
should_use_fake_user: BoolProperty(default=True, name='Fake User', description='Assign each imported action a fake user so that the data block is saved even it has no users.', options=set())
should_stash: BoolProperty(default=False, name='Stash', description='Stash each imported action as a strip on a new non-contributing NLA track', options=set())
should_use_action_name_prefix: BoolProperty(default=False, name='Prefix Action Name', options=set())
action_name_prefix: StringProperty(default='', name='Prefix', options=set())
class PSA_UL_SequenceList(UIList):

View File

@ -140,6 +140,7 @@ class PskExportOperator(Operator, ExportHelper):
class PskExportPropertyGroup(PropertyGroup):
bone_filter_mode: EnumProperty(
name='Bone Filter',
options=set(),
description='',
items=(
('ALL', 'All', 'All bones will be exported.'),

View File

@ -228,9 +228,15 @@ class PskImporter(object):
class PskImportPropertyGroup(PropertyGroup):
should_import_vertex_colors: BoolProperty(default=True, name='Vertex Colors', description='Import vertex colors from PSKX files, if available')
should_import_vertex_colors: BoolProperty(
default=True,
options=set(),
name='Vertex Colors',
description='Import vertex colors from PSKX files, if available'
)
vertex_color_space: EnumProperty(
name='Vertex Color Space',
options=set(),
description='The source vertex color space',
default='SRGBA',
items=(
@ -238,8 +244,18 @@ class PskImportPropertyGroup(PropertyGroup):
('SRGBA', 'sRGBA', ''),
)
)
should_import_vertex_normals: BoolProperty(default=True, name='Vertex Normals', description='Import vertex normals from PSKX files, if available')
should_import_extra_uvs: BoolProperty(default=True, name='Extra UVs', description='Import extra UV maps from PSKX files, if available')
should_import_vertex_normals: BoolProperty(
default=True,
name='Vertex Normals',
options=set(),
description='Import vertex normals from PSKX files, if available'
)
should_import_extra_uvs: BoolProperty(
default=True,
name='Extra UVs',
options=set(),
description='Import extra UV maps from PSKX files, if available'
)
class PskImportOperator(Operator, ImportHelper):