progress of workfile save file in resolve

This commit is contained in:
Jakub Jezek 2023-06-23 16:26:14 +02:00
parent 23fe05dbf8
commit 33f83f587d
No known key found for this signature in database
GPG key ID: 730D7C02726179A7

View file

@ -30,13 +30,22 @@ def save_file(filepath):
project = get_current_project() project = get_current_project()
name = project.GetName() name = project.GetName()
if "Untitled Project" not in name: log.info("name: `{}`, file: '{}'".format(name, file))
log.info("Saving project: `{}` as '{}'".format(name, file)) log.info("fname: `{}`, filepath: '{}'".format(fname, filepath))
pm.ExportProject(name, filepath)
else: if "Untitled Project" in name:
log.info("Creating new project...") log.info("Creating new project...")
pm.CreateProject(fname) response = pm.CreateProject(fname)
pm.ExportProject(name, filepath) log.info("New project created: {}".format(response))
else:
log.info("Saving project: `{}` as '{}'".format(name, file))
response = project.SetName(fname)
log.info("Project renamed: {}".format(response))
if response:
# only export if project was saved or renamed
exported = pm.ExportProject(fname, filepath)
log.info("Project exported: {}".format(exported))
def open_file(filepath): def open_file(filepath):