diff --git a/export_geo.py b/export_geo.py index 6c45f57..5129c39 100644 --- a/export_geo.py +++ b/export_geo.py @@ -3,6 +3,7 @@ from .geomesh import * from .bones import * import bpy.path import bpy +import mathutils from bpy_extras.io_utils import axis_conversion @@ -111,8 +112,13 @@ def save(operator, context, scale = 1.0, filepath = "", global_matrix = None, us body_name = bpy.path.display_name_from_filepath(filepath) geo.setName(body_name) - axis_rotation = axis_conversion('-Y', 'Z', 'Z', 'Y') + #axis_rotation = axis_conversion('-Y', 'Z', 'Z', 'Y') #axis_rotation = axis_conversion('Y', 'Z', '-Z', 'Y') + axis_rotation = mathutils.Matrix([ + [-1, 0, 0], + [0, 0, -1], + [0, 1, 0], + ]) axis_rotation.resize_4x4() print("scale: %s" % (scale, )) @@ -152,7 +158,7 @@ def save(operator, context, scale = 1.0, filepath = "", global_matrix = None, us convert_mesh(geo_model, mesh, ob) - if True: #flip bones + if False: #flip bones for i in range(len(geo.models) - 1, -1, -1): name = geo.models[i].name.decode("utf-8") #if reg_exp.search(name) is not None: