OSDN Git Service

fix export_pmd
[meshio/pymeshio.git] / blender25-meshio / export_mqo.py
index cd400b8..fbe3a77 100644 (file)
@@ -17,16 +17,16 @@ Usage:
 
 Run this script from "File->Export" menu.
 
-0.1 20080128:
-0.2 20100518: refactoring.
-0.3 20100606: integrate 2.4 and 2.5.
-0.4 20100626: refactoring.
-0.5 20100710: add [apply_modifier] option(2.5 only).
-0.6 20100714: remove shape_key when apply_modifier. fix material.
-2.0 20100724: update for Blender2.53.
-2.1 20101005: update for Blender2.54.
-2.2 20101228: update for Blender2.55.
-2.4 20110429: update for Blender2.57b.
+20080128:
+20100518: refactoring.
+20100606: integrate 2.4 and 2.5.
+20100626: refactoring.
+20100710: add [apply_modifier] option(2.5 only).
+20100714: remove shape_key when apply_modifier. fix material.
+20100724: update for Blender2.53.
+20101005: update for Blender2.54.
+20101228: update for Blender2.55.
+20110429: update for Blender2.57b.
 """
 
 bl_addon_info = {
@@ -72,7 +72,7 @@ class MQOMaterial(object):
 import bpy
 
 # wrapper
-import bl25 as bl
+from . import bl25 as bl
 
 def materialToMqo(m):
     material=MQOMaterial(m.name, 3)
@@ -228,12 +228,15 @@ class MqoExporter(object):
             # duplicate and applyMatrix
             copyMesh, copyObj=bl.object.duplicate(obj)
             # apply transform
+            """
             copyObj.scale=obj.scale
             bpy.ops.object.scale_apply()
             copyObj.rotation_euler=obj.rotation_euler
             bpy.ops.object.rotation_apply()
             copyObj.location=obj.location
             bpy.ops.object.location_apply()
+            """
+            copyMesh.transform(obj.matrix_world)
             # apply modifier
             if self.apply_modifier:
                 # remove shape key