diff options
author | Matt Ebb <matt@mke3.net> | 2010-04-05 10:45:44 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-04-05 10:45:44 +0400 |
commit | 547838476109b909259a7608e4c092214da91387 (patch) | |
tree | a22de19a48c255710ced448978cf0f77fa984331 /release/scripts/io/export_ply.py | |
parent | 75df05b83fa2b54893fcd7016cb468d9d9a7ac08 (diff) |
Fix [#21886] OBJ export crashes if attempted while in edit mode
Didn't crash for me, but did export incorrectly since editmode changes weren't flushed.
Fixed this by setting all exporters to go back to object mode before exporting.
Also cleaned up some naming in exporter creator strings, it's "Blender" not "Blender3D".
Diffstat (limited to 'release/scripts/io/export_ply.py')
-rw-r--r-- | release/scripts/io/export_ply.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/release/scripts/io/export_ply.py b/release/scripts/io/export_ply.py index f3c6541f476..23a3eb8b9ee 100644 --- a/release/scripts/io/export_ply.py +++ b/release/scripts/io/export_ply.py @@ -99,6 +99,7 @@ def write(filename, scene, ob, \ Window.WaitCursor(1) """ + bpy.ops.object.mode_set(mode='OBJECT') #mesh = BPyMesh.getMeshFromObject(ob, None, EXPORT_APPLY_MODIFIERS, False, scn) # XXX if EXPORT_APPLY_MODIFIERS: @@ -202,7 +203,7 @@ def write(filename, scene, ob, \ file.write('ply\n') file.write('format ascii 1.0\n') - file.write('comment Created by Blender3D %s - www.blender.org, source file: %s\n' % (bpy.app.version_string, bpy.data.filename.split('/')[-1].split('\\')[-1])) + file.write('comment Created by Blender %s - www.blender.org, source file: %s\n' % (bpy.app.version_string, bpy.data.filename.split('/')[-1].split('\\')[-1])) file.write('element vertex %d\n' % len(ply_verts)) |