Do not play when compiling

This commit is contained in:
Lubos Lenco 2017-01-10 15:06:46 +01:00
parent 13a3526273
commit b8af3aab04

View file

@ -447,6 +447,9 @@ class ArmoryPlayButton(bpy.types.Operator):
bl_label = 'Play'
def execute(self, context):
if state.compileproc != None:
return {"CANCELLED"}
if not armutils.check_saved(self):
return {"CANCELLED"}
@ -469,6 +472,9 @@ class ArmoryPlayInViewportButton(bpy.types.Operator):
bl_label = 'Play in Viewport'
def execute(self, context):
if state.compileproc != None:
return {"CANCELLED"}
if not armutils.check_saved(self):
return {"CANCELLED"}