Blendershell exception fix

This commit is contained in:
Jack Andersen 2016-04-03 20:25:41 -10:00
parent 124b5e5f3a
commit 8611c85791
1 changed files with 2 additions and 1 deletions

View File

@ -199,7 +199,8 @@ while True:
elif cmdargs[0] == 'OPEN':
if 'FINISHED' in bpy.ops.wm.open_mainfile(filepath=cmdargs[1]):
bpy.ops.object.mode_set(mode = 'OBJECT')
if bpy.ops.object.mode_set.poll():
bpy.ops.object.mode_set(mode = 'OBJECT')
writepipeline(b'FINISHED')
else:
writepipeline(b'CANCELLED')