Update props_traits.py

Add a few check to navmesh generation and message logs
This commit is contained in:
N8n5h 2019-08-11 11:49:06 -03:00 committed by GitHub
parent f07469db90
commit 92153e15f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -317,8 +317,14 @@ class ArmoryGenerateNavmeshButton(bpy.types.Operator):
if obj.type != 'MESH':
return{'CANCELLED'}
if not arm.utils.check_saved(self):
return {"CANCELLED"}
if not arm.utils.check_sdkpath(self):
return {"CANCELLED"}
# TODO: build tilecache here
print("Started visualization generation")
# For visualization
nav_full_path = arm.utils.get_fp_build() + '/compiled/Assets/navigation'
if not os.path.exists(nav_full_path):
@ -373,6 +379,8 @@ class ArmoryGenerateNavmeshButton(bpy.types.Operator):
bpy.ops.mesh.remove_doubles()
bpy.ops.object.editmode_toggle()
print("Finished visualization generation")
return{'FINISHED'}
class ArmEditCanvasButton(bpy.types.Operator):