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_mesh_ply | |
parent | 7e6e45d7a7c80798a21684c278334188cce0e501 (diff) |
remove use of ob.update_from_editmode() since editmode meshes don't get access to customdata layers.
Diffstat (limited to 'io_mesh_ply')
-rw-r--r-- | io_mesh_ply/export_ply.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/io_mesh_ply/export_ply.py b/io_mesh_ply/export_ply.py index 48d1542f..4ef8b5fb 100644 --- a/io_mesh_ply/export_ply.py +++ b/io_mesh_ply/export_ply.py @@ -197,7 +197,8 @@ def save(operator, if not obj: raise Exception("Error, Select 1 active object") - obj.update_from_editmode() + if bpy.ops.object.mode_set.poll(): + bpy.ops.object.mode_set(mode='OBJECT') if use_mesh_modifiers and obj.modifiers: mesh = obj.to_mesh(scene, True, 'PREVIEW') |