summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--collada_superbmd_export.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/collada_superbmd_export.py b/collada_superbmd_export.py
index ba721d5..27d63c7 100644
--- a/collada_superbmd_export.py
+++ b/collada_superbmd_export.py
@@ -85,10 +85,16 @@ def write_bmd_bdl_collada(context, filepath, triangulate):
armature = scene.objects.active
blender_funcs.select_obj(scene, armature, False)
- # apply the transformations
+ # apply the transformations to the armature
armature.rotation_euler[0] = math.radians(-90)
armature.scale = 100 * armature.scale
- bpy.ops.object.transforms_to_deltas(mode = 'ALL')
+ bpy.ops.object.transform_apply(location = True, rotation = True, scale = True)
+
+ # apply the transformations to the meshes inside the armature
+ for i in range(0, len(armature.children)):
+ blender_funcs.select_obj(scene, armature.children[i], False)
+ bpy.ops.object.transform_apply(location = True, rotation = True, scale = True)
+ blender_funcs.select_obj(scene, armature, False)
# handle the object names so that they match the original model names
armature.name = obj_name