save the file when creating the dir

For some reason if you don't save the file the path check doesn't work even if the folder is there.
This commit is contained in:
N8n5h 2019-10-04 20:23:25 -03:00 committed by GitHub
parent bcf3f5d2e2
commit 93f5b1dace
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -334,6 +334,7 @@ class ArmoryGenerateNavmeshButton(bpy.types.Operator):
if not os.path.exists(nav_full_path):
os.makedirs(nav_full_path)
restart_required = True
bpy.ops.wm.save_mainfile()
if restart_required:
self.report({'ERROR'}, 'Please restart Blender to generate a mesh representation.')