diff --git a/korman/exporter/mesh.py b/korman/exporter/mesh.py index faee86b..9ae48e0 100644 --- a/korman/exporter/mesh.py +++ b/korman/exporter/mesh.py @@ -221,8 +221,8 @@ class MeshConverter: if coluv not in data.blender2gs[vertex]: source = mesh.vertices[vertex] geoVertex = plGeometrySpan.TempVertex() - geoVertex.position = utils.vector3(source.co) - geoVertex.normal = utils.vector3(source.normal) + geoVertex.position = hsVector3(*source.co) + geoVertex.normal = hsVector3(*source.normal) geoVertex.color = hsColor32(*vertex_color) geoVertex.uvs = [hsVector3(uv[0], uv[1], 0.0) for uv in uvws] data.blender2gs[vertex][coluv] = len(data.vertices) diff --git a/korman/exporter/physics.py b/korman/exporter/physics.py index b1b621d..69d5e89 100644 --- a/korman/exporter/physics.py +++ b/korman/exporter/physics.py @@ -33,7 +33,7 @@ class PhysicsConverter: # We can only use the plPhysical xforms if there is a CI... if self._exporter().has_coordiface(bo): mesh.update(calc_tessface=indices) - physical.pos = utils.vector3(mat.to_translation()) + physical.pos = hsVector3(*mat.to_translation()) physical.rot = utils.quaternion(mat.to_quaternion()) # Physicals can't have scale... diff --git a/korman/exporter/utils.py b/korman/exporter/utils.py index 297b116..3471a33 100644 --- a/korman/exporter/utils.py +++ b/korman/exporter/utils.py @@ -32,7 +32,3 @@ def matrix44(blmat): def quaternion(blquat): """Converts a mathutils.Quaternion to an hsQuat""" return hsQuat(blquat.x, blquat.y, blquat.z, blquat.w) - -def vector3(blvec): - """Converts a mathutils.Vector to an hsVector3""" - return hsVector3(blvec.x, blvec.y, blvec.z) diff --git a/korman/properties/modifiers/anim.py b/korman/properties/modifiers/anim.py index 478986c..bf4996b 100644 --- a/korman/properties/modifiers/anim.py +++ b/korman/properties/modifiers/anim.py @@ -112,8 +112,8 @@ class PlasmaAnimationModifier(PlasmaModifierProperties): # Decompose the matrix into the 90s-era 3ds max affine parts sillyness # All that's missing now is something like "(c) 1998 HeadSpin" oh wait... affine = hsAffineParts() - affine.T = utils.vector3(matrix.to_translation()) - affine.K = utils.vector3(matrix.to_scale()) + affine.T = hsVector3(*matrix.to_translation()) + affine.K = hsVector3(*matrix.to_scale()) affine.F = -1.0 if matrix.determinant() < 0.0 else 1.0 rot = matrix.to_quaternion() affine.Q = utils.quaternion(rot)