diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-24 23:47:31 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-24 23:47:31 +0400 |
commit | 2d048308c69a7671b43c246ef882f99661dd771d (patch) | |
tree | e2e7624482f7f2c9056bb822102b85b816ee6011 /io_scene_vrml2/export_vrml2.py | |
parent | 7e6e45d7a7c80798a21684c278334188cce0e501 (diff) |
remove use of ob.update_from_editmode() since editmode meshes don't get access to customdata layers.
Diffstat (limited to 'io_scene_vrml2/export_vrml2.py')
-rw-r--r-- | io_scene_vrml2/export_vrml2.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/io_scene_vrml2/export_vrml2.py b/io_scene_vrml2/export_vrml2.py index 78d1e45b..29b76ddb 100644 --- a/io_scene_vrml2/export_vrml2.py +++ b/io_scene_vrml2/export_vrml2.py @@ -177,10 +177,16 @@ def save_object(fw, global_matrix, assert(obj.type == 'MESH') if use_mesh_modifiers: - obj.update_from_editmode() + is_editmode = (obj.mode == 'EDIT') + if is_editmode: + bpy.ops.object.editmode_toggle() + 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': |