Fix invalid fp when using local sdk

This commit is contained in:
tong 2021-09-04 02:46:25 +02:00
parent 156f1f433a
commit d1fe4d6686

View file

@ -108,6 +108,10 @@ def get_fp():
wrd = bpy.data.worlds['Arm'] wrd = bpy.data.worlds['Arm']
if wrd.arm_project_root != '': if wrd.arm_project_root != '':
return bpy.path.abspath(wrd.arm_project_root) return bpy.path.abspath(wrd.arm_project_root)
else:
s = None
if use_local_sdk and bpy.data.filepath == '':
s = os.getcwd()
else: else:
s = bpy.data.filepath.split(os.path.sep) s = bpy.data.filepath.split(os.path.sep)
s.pop() s.pop()