[#23035] Obj export crash

check for an active object before switching modes.
This commit is contained in:
2010-07-26 18:32:22 +00:00
parent ba49943d7e
commit 10b124ae39
5 changed files with 11 additions and 6 deletions

View File

@@ -823,7 +823,8 @@ def do_export(filepath, context,
orig_scene = context.scene
# Exit edit mode before exporting, so current object states are exported properly.
bpy.ops.object.mode_set(mode='OBJECT')
if context.object:
bpy.ops.object.mode_set(mode='OBJECT')
# if EXPORT_ALL_SCENES:
# export_scenes = bpy.data.scenes