mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
progress of workfile save file in resolve
This commit is contained in:
parent
23fe05dbf8
commit
33f83f587d
1 changed files with 15 additions and 6 deletions
|
|
@ -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):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue