diff --git a/__init__.py b/__init__.py index b13d3b0..33c80ab 100644 --- a/__init__.py +++ b/__init__.py @@ -11,7 +11,7 @@ bl_info = { "name": "SEAnim Support", "author": "SE2Dev", - "version": (0, 4, 1), + "version": (0, 4, 3), "blender": (2, 80, 0), "location": "File > Import", "description": "Import SEAnim", diff --git a/import_seanim.py b/import_seanim.py index 346ff8e..a7dcc5d 100644 --- a/import_seanim.py +++ b/import_seanim.py @@ -179,7 +179,11 @@ def load_seanim(self, context, progress, filepath=""): if (animType == SEAnim.SEANIM_TYPE.SEANIM_TYPE_ABSOLUTE and bone.parent is not None): bone.matrix.translation = bone.parent.matrix @ offset - else: # Use DELTA / RELATIVE results (ADDITIVE is unknown) + # SEANIM_TYPE_RELATIVE + elif animType == SEAnim.SEANIM_TYPE.SEANIM_TYPE_RELATIVE: + bone.matrix_basis.translation = bone.bone.matrix.inverted() @ offset + # Use DELTA / RELATIVE results (ADDITIVE is unknown) + else: bone.matrix_basis.translation = offset # bone.keyframe_insert("location", index=-1, frame=key.frame, group=tag.name) # nopep8