Add-on: don't write a .flamenco.blend when already on shared storage

Skip writing the `.flamenco.blend` file when working directly on shared
storage. This was already the intended behaviour, but I think it got lost
in a recent refactor.
This commit is contained in:
Sybren A. Stüvel 2024-08-01 14:41:54 +02:00
parent b68e51976d
commit 6704f6619d

View File

@ -335,7 +335,14 @@ class FLAMENCO_OT_submit_job(FlamencoOpMixin, bpy.types.Operator):
) )
prefs.experimental.use_all_linked_data_direct = True prefs.experimental.use_all_linked_data_direct = True
filepath = Path(context.blend_data.filepath).with_suffix(".flamenco.blend") filepath = Path(context.blend_data.filepath)
if job_submission.is_file_inside_job_storage(context, filepath):
self.log.info(
"Saving blendfile, already in shared storage: %s", filepath
)
bpy.ops.wm.save_as_mainfile()
else:
filepath = filepath.with_suffix(".flamenco.blend")
self.log.info("Saving copy to temporary file %s", filepath) self.log.info("Saving copy to temporary file %s", filepath)
bpy.ops.wm.save_as_mainfile( bpy.ops.wm.save_as_mainfile(
filepath=str(filepath), compress=True, copy=True filepath=str(filepath), compress=True, copy=True