Correct skeleton imports, though what to do with re-parenting and skeleton impurities such as effector nulls still uncertain
This commit is contained in:
@@ -5,6 +5,16 @@ from .msh_model import *
|
||||
from .msh_utilities import *
|
||||
from mathutils import Vector, Matrix
|
||||
|
||||
|
||||
def convert_vector_space_(vec: Vector) -> Vector:
|
||||
return Vector((-vec.x, vec.z, vec.y))
|
||||
|
||||
def convert_rotation_space_(quat: Quaternion) -> Quaternion:
|
||||
return Quaternion((-quat.w, quat.x, -quat.z, -quat.y))
|
||||
|
||||
def model_transform_to_matrix(transform: ModelTransform):
|
||||
return Matrix.Translation(convert_vector_space_(transform.translation)) @ convert_rotation_space_(transform.rotation).to_matrix().to_4x4()
|
||||
|
||||
def scale_segments(scale: Vector, segments: List[GeometrySegment]):
|
||||
""" Scales are positions in the GeometrySegment list. """
|
||||
|
||||
|
||||
Reference in New Issue
Block a user