diff options
author | Kalle-Samuli Riihikoski <haikalle@gmail.com> | 2012-06-18 18:01:48 +0400 |
---|---|---|
committer | Kalle-Samuli Riihikoski <haikalle@gmail.com> | 2012-06-18 18:01:48 +0400 |
commit | d1289656f040011b8619a73f4dff2f16d4dabdf9 (patch) | |
tree | 1f2148bdd48b929e0fc2b4c25797b1edbd0ba1ae /io_coat3D | |
parent | 0bc5fba842f9a09e5ffea88c0b5995e664834c18 (diff) |
fixes scaling bug.
Diffstat (limited to 'io_coat3D')
-rw-r--r-- | io_coat3D/coat.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/io_coat3D/coat.py b/io_coat3D/coat.py index a9835244..ee81aead 100644 --- a/io_coat3D/coat.py +++ b/io_coat3D/coat.py @@ -228,15 +228,15 @@ class SCENE_OT_export(bpy.types.Operator): obj.location = (0,0,0) obj.rotation_euler = (0,0,0) - obj.scale = (1,1,1) - + bpy.ops.object.transform_apply(scale=True) + bpy.ops.export_scene.obj(filepath=coa.applink_name,use_selection=True, - use_apply_modifiers=False,use_blen_objects=True, group_by_material= True, - use_materials = False,keep_vertex_order = True,axis_forward='X',axis_up='Y') - + use_apply_modifiers=False,use_blen_objects=True, use_materials = False, + keep_vertex_order = True,axis_forward='X',axis_up='Y') + obj.location = coa.loc obj.rotation_euler = coa.rot - obj.scale = coa.sca + bpy.context.scene.cursor_location = coat3D.cursor_loc bpy.context.scene.cursor_location = coat3D.cursor_orginal @@ -249,6 +249,8 @@ class SCENE_OT_export(bpy.types.Operator): file.close() coa.objecttime = str(os.path.getmtime(coa.applink_name)) + + return {'FINISHED'} |