workio
Host API for working with workfiles.
current_file()
Return the current workfile.
Source code in client/ayon_mocha/api/workio.py
65 66 67 68 69 70 |
|
file_extensions()
Return file extensions for workfiles.
Source code in client/ayon_mocha/api/workio.py
12 13 14 |
|
has_unsave_changes()
Return True if the current workfile has unsaved changes.
Mocha Pro doesn't have API to query this state so we always return False.
Source code in client/ayon_mocha/api/workio.py
17 18 19 20 21 22 |
|
open_file(filepath)
Open a workfile.
There is probably no way to open a workfile in Mocha Pro directly, so we run Mocha Pro with the footage file as an argument, this will open new Mocha Pro window with the project loaded, and we kill the original application.There wasn't even a way to quit Mocha Pro in standard way, so we terminate it rather forcefully.
Todo (antirotor): quit mocha only if the run_mocha was successful.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filepath | Path | Path to the workfile. | required |
Source code in client/ayon_mocha/api/workio.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|
save_file(filepath)
Save the current workfile.
Note that project cannot be saved without being created first. To create the project, you need to specify clip first, thus we can't create workfile from the un-initialized project within Mocha Pro.
Source code in client/ayon_mocha/api/workio.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|