Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-04-15 21:21:17 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-04-15 21:21:17 +0400
commite88ccb06cc638467174f8b2e0ad3af1828db2c68 (patch)
treeabb90f6cdfd7f294e3d45fadb633a736eaf9ad82 /io_mesh_ply/export_ply.py
parent81507f54080373b9f23f212e23e3ea6299490140 (diff)
option to apply scale on export. also add global scale options for exporters. OBJ/X3D/VRML/PLY/STL
Diffstat (limited to 'io_mesh_ply/export_ply.py')
-rw-r--r--io_mesh_ply/export_ply.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/io_mesh_ply/export_ply.py b/io_mesh_ply/export_ply.py
index 4ef8b5fb..d4db5710 100644
--- a/io_mesh_ply/export_ply.py
+++ b/io_mesh_ply/export_ply.py
@@ -189,13 +189,15 @@ def save(operator,
use_normals=True,
use_uv_coords=True,
use_colors=True,
+ global_matrix=None
):
scene = context.scene
obj = context.active_object
- if not obj:
- raise Exception("Error, Select 1 active object")
+ if global_matrix is None:
+ from mathutils import Matrix
+ global_matrix = Matrix()
if bpy.ops.object.mode_set.poll():
bpy.ops.object.mode_set(mode='OBJECT')
@@ -208,7 +210,7 @@ def save(operator,
if not mesh:
raise Exception("Error, could not get mesh data from active object")
- mesh.transform(obj.matrix_world)
+ mesh.transform(global_matrix * obj.matrix_world)
if use_normals:
mesh.calc_normals()