diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-12 11:32:25 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-12 11:32:25 +0400 |
commit | 7658df0733d75fa96a3838b53ff60c9a0d29c5bd (patch) | |
tree | d7d9eeafb8eaedfedca4620b8455fc9e78fdaebd /io_scene_vrml2/export_vrml2.py | |
parent | 11c7855371439e85bd8b6fbfb4329e8eed6bd585 (diff) |
add axis conversion to wrl export.
Diffstat (limited to 'io_scene_vrml2/export_vrml2.py')
-rw-r--r-- | io_scene_vrml2/export_vrml2.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/io_scene_vrml2/export_vrml2.py b/io_scene_vrml2/export_vrml2.py index a3370a3a..50230bc2 100644 --- a/io_scene_vrml2/export_vrml2.py +++ b/io_scene_vrml2/export_vrml2.py @@ -165,7 +165,8 @@ def detect_default_image(obj, bm): return None -def save_object(fw, scene, obj, +def save_object(fw, global_matrix, + scene, obj, use_mesh_modifiers, use_color, color_type, use_uv, @@ -193,7 +194,7 @@ def save_object(fw, scene, obj, bm = bmesh.new() bm.from_mesh(me) - bm.transform(obj.matrix_world) + bm.transform(global_matrix * obj.matrix_world) bmesh.ops.triangulate(bm, faces=bm.faces, use_beauty=True) # default empty @@ -232,6 +233,7 @@ def save_object(fw, scene, obj, def save(operator, context, filepath="", + global_matrix=None, use_selection=False, use_mesh_modifiers=True, use_color=True, @@ -257,7 +259,8 @@ def save(operator, for obj in objects: if obj.type == 'MESH': fw("\n# %r\n" % obj.name) - save_object(fw, scene, obj, + save_object(fw, global_matrix, + scene, obj, use_mesh_modifiers, use_color, color_type, use_uv, |