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

Minor code changes

This commit is contained in:
Colin Basnett 2022-07-26 15:00:14 -07:00
parent f58d4c5539
commit 3627abe6fc
3 changed files with 4 additions and 8 deletions

View File

@ -150,10 +150,7 @@ def build_psa(context, options: PsaBuildOptions) -> Psa:
psa_bone.parent_index = -1 psa_bone.parent_index = -1
if bone.parent is not None: if bone.parent is not None:
rotation = bone.matrix.to_quaternion() rotation = bone.matrix.to_quaternion().conjugated()
rotation.x = -rotation.x
rotation.y = -rotation.y
rotation.z = -rotation.z
inverse_parent_rotation = bone.parent.matrix.to_quaternion().inverted() inverse_parent_rotation = bone.parent.matrix.to_quaternion().inverted()
parent_head = inverse_parent_rotation @ bone.parent.head parent_head = inverse_parent_rotation @ bone.parent.head
parent_tail = inverse_parent_rotation @ bone.parent.tail parent_tail = inverse_parent_rotation @ bone.parent.tail

View File

@ -386,6 +386,9 @@ class PsaImportSequencesFromText(Operator):
def execute(self, context): def execute(self, context):
pg = context.scene.psa_import pg = context.scene.psa_import
if pg.select_text is None:
self.report({'ERROR_INVALID_CONTEXT'}, 'No text block selected')
return {'CANCELLED'}
contents = pg.select_text.as_string() contents = pg.select_text.as_string()
count = 0 count = 0
for line in contents.split('\n'): for line in contents.split('\n'):

View File

@ -15,10 +15,6 @@ class BoneGroupListItem(PropertyGroup):
count: IntProperty() count: IntProperty()
is_selected: BoolProperty(default=False) is_selected: BoolProperty(default=False)
@property
def name(self):
return self.name
classes = ( classes = (
BoneGroupListItem, BoneGroupListItem,