Fix invalid temp-dir for image-project on unsaved files

The preferences tempdir being used instead of bpy.app.tempdir.
This commit is contained in:
Campbell Barton 2020-10-03 17:57:28 +10:00
parent 9b602a8020
commit cacd84a318
1 changed files with 1 additions and 2 deletions

View File

@ -156,8 +156,7 @@ class ProjectEdit(Operator):
if bpy.data.is_saved:
filepath = "//" + filepath
else:
tmpdir = context.preferences.filepaths.temporary_directory
filepath = os.path.join(tmpdir, "project_edit")
filepath = os.path.join(bpy.app.tempdir, "project_edit")
obj = context.object