Compare commits
7 Commits
feature-ps
...
2.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e2b74edaf | ||
|
|
57d1f78d9e | ||
|
|
6158eb024d | ||
|
|
71622e5ab9 | ||
|
|
4f61d341d4 | ||
|
|
24e606a3fd | ||
|
|
8c0b7f84fc |
10
README.md
10
README.md
@@ -1,4 +1,4 @@
|
||||
This Blender add-on allows you to import and export meshes and animations to the [PSK and PSA file formats](https://wiki.beyondunreal.com/PSK_%26_PSA_file_formats). In addition, the non-standard PSKX format is also supported for import only.
|
||||
This Blender add-on allows you to import and export meshes and animations to and from the [PSK and PSA file formats](https://wiki.beyondunreal.com/PSK_%26_PSA_file_formats). In addition, the non-standard PSKX format is also supported for import only.
|
||||
|
||||
# Installation
|
||||
1. Download the zip file for the latest version from the [releases](https://github.com/DarklightGames/io_export_psk_psa/releases) page.
|
||||
@@ -10,13 +10,13 @@ This Blender add-on allows you to import and export meshes and animations to the
|
||||
7. Enable the newly added "Import-Export: PSK/PSA Importer/Exporter" addon.
|
||||
|
||||
# Usage
|
||||
## Exporting a PSK/PSKX
|
||||
## Exporting a PSK
|
||||
1. Select the mesh objects you wish to export.
|
||||
3. Navigate to File > Export > Unreal PSK (.psk/.pskx)
|
||||
3. Navigate to File > Export > Unreal PSK (.psk)
|
||||
4. Enter the file name and click "Export".
|
||||
|
||||
## Importing a PSK
|
||||
1. Navigate to File > Import > Unreal PSK (.psk)
|
||||
## Importing a PSK/PSKX
|
||||
1. Navigate to File > Import > Unreal PSK (.psk/.pskx)
|
||||
2. Select the PSK file you want to import and click "Import"
|
||||
|
||||
## Exporting a PSA
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
bl_info = {
|
||||
"name": "PSK/PSA Importer/Exporter",
|
||||
"author": "Colin Basnett",
|
||||
"version": (1, 2, 0),
|
||||
"version": (2, 1, 0),
|
||||
"blender": (2, 80, 0),
|
||||
# "location": "File > Export > PSK Export (.psk)",
|
||||
"description": "PSK/PSA Import/Export (.psk/.psa)",
|
||||
|
||||
@@ -16,7 +16,6 @@ class PsaImportOptions(object):
|
||||
self.should_use_fake_user = False
|
||||
self.should_stash = False
|
||||
self.sequence_names = []
|
||||
self.action_name_prefix = ''
|
||||
|
||||
|
||||
class PsaImporter(object):
|
||||
@@ -116,8 +115,7 @@ class PsaImporter(object):
|
||||
actions = []
|
||||
for sequence in sequences:
|
||||
# Add the action.
|
||||
action_name = options.action_name_prefix + sequence.name.decode('windows-1252')
|
||||
action = bpy.data.actions.new(name=action_name)
|
||||
action = bpy.data.actions.new(name=sequence.name.decode())
|
||||
action.use_fake_user = options.should_use_fake_user
|
||||
|
||||
# Create f-curves for the rotation and location of each bone.
|
||||
@@ -244,7 +242,6 @@ class PsaImportPropertyGroup(PropertyGroup):
|
||||
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')
|
||||
action_name_prefix: StringProperty(default='', name='Action Name Prefix')
|
||||
|
||||
|
||||
class PSA_UL_ImportActionList(UIList):
|
||||
@@ -352,13 +349,13 @@ class PSA_PT_ImportPanel(Panel):
|
||||
row.operator('psa_import.actions_select_all', text='All')
|
||||
row.operator('psa_import.actions_deselect_all', text='None')
|
||||
|
||||
col = layout.column(heading="Options")
|
||||
col.use_property_split = True
|
||||
col.use_property_decorate = False
|
||||
col.prop(property_group, 'should_clean_keys')
|
||||
col.prop(property_group, 'should_use_fake_user')
|
||||
col.prop(property_group, 'should_stash')
|
||||
col.prop(property_group, 'action_name_prefix')
|
||||
row = layout.row()
|
||||
row.prop(property_group, 'should_clean_keys')
|
||||
|
||||
# DATA
|
||||
row = layout.row()
|
||||
row.prop(property_group, 'should_use_fake_user')
|
||||
row.prop(property_group, 'should_stash')
|
||||
|
||||
layout.operator('psa_import.import', text=f'Import')
|
||||
|
||||
@@ -402,7 +399,6 @@ class PsaImportOperator(Operator):
|
||||
options.should_clean_keys = property_group.should_clean_keys
|
||||
options.should_use_fake_user = property_group.should_use_fake_user
|
||||
options.should_stash = property_group.should_stash
|
||||
options.action_name_prefix = property_group.action_name_prefix
|
||||
PsaImporter().import_psa(psa_reader, context.view_layer.objects.active, options)
|
||||
self.report({'INFO'}, f'Imported {len(sequence_names)} action(s)')
|
||||
return {'FINISHED'}
|
||||
|
||||
Reference in New Issue
Block a user