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-03-21 18:55:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-21 18:55:28 +0400
commitc75f170adb9ab2195aaa98122ed02d9332b1b72a (patch)
tree6785899cb32f0a7a195cb7ea17a15771f18b3cb3 /io_scene_vrml2
parent08e558d60f30781a2c92044e98bcd0e61633f92a (diff)
use object.update_from_editmode() for scripts which read object data.
Diffstat (limited to 'io_scene_vrml2')
-rw-r--r--io_scene_vrml2/export_vrml2.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/io_scene_vrml2/export_vrml2.py b/io_scene_vrml2/export_vrml2.py
index 29b76ddb..78d1e45b 100644
--- a/io_scene_vrml2/export_vrml2.py
+++ b/io_scene_vrml2/export_vrml2.py
@@ -177,16 +177,10 @@ def save_object(fw, global_matrix,
assert(obj.type == 'MESH')
if use_mesh_modifiers:
- is_editmode = (obj.mode == 'EDIT')
- if is_editmode:
- bpy.ops.object.editmode_toggle()
-
+ obj.update_from_editmode()
me = obj.to_mesh(scene, True, 'PREVIEW', calc_tessface=False)
bm = bmesh.new()
bm.from_mesh(me)
-
- if is_editmode:
- bpy.ops.object.editmode_toggle()
else:
me = obj.data
if obj.mode == 'EDIT':