-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mocha integration with AYON #5
base: develop
Are you sure you want to change the base?
Conversation
Loading was not working. And the Mocha was freezing after some time. There is not available any console log output which I could share with you. |
Here is another bizarre thing happening since ayon-mocha was added to my testing bundle. Not sure if it is actually related to the Mocha integration of to ayon-core in general. ynput/ayon-silhouette#1 (comment)
EDIT: |
Co-authored-by: Roy Nieterau <[email protected]>
Co-authored-by: Roy Nieterau <[email protected]>
This is now possible - it seems that you can have only one default trackable clip per project that cannot be change (or renamed). So i added new loader, that is changing source of the clip. |
…to feature/basic-infrastructure
project_name = self.project_name | ||
folder_path = self.create_context.get_current_folder_path() | ||
task_name = self.create_context.get_current_task_name() | ||
host_name = self.create_context.host_name | ||
|
||
current_folder_path = None | ||
if current_instance is not None: | ||
current_folder_path = current_instance["folderPath"] | ||
|
||
if current_instance is None: | ||
folder_entity = ayon_api.get_folder_by_path( | ||
project_name, folder_path | ||
) | ||
task_entity = ayon_api.get_task_by_name( | ||
project_name, folder_entity["id"], task_name | ||
) | ||
product_name = self.get_product_name( | ||
project_name, | ||
folder_entity, | ||
task_entity, | ||
variant, | ||
host_name, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be refactored to use the entity getters on the create_context
, e.g. self.create_context.get_current_task_entity()
, etc. | or at least @iLLiCiTiT will tell you that!
I believe Silhouette integration already did that too, and maybe only a few other hosts (I think resolve maybe?). Reference: https://github.com/ynput/ayon-silhouette/blob/3fbd09c0bef7b994d4e27961a5d19a694548f89b/client/ayon_silhouette/plugins/create/create_workfile.py#L31-L37
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right, it's copypasta from Maya :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe - since the code is mostly the same, should we have workfile creator base in ayon-core?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe - since the code is mostly the same, should we have workfile creator base in ayon-core?
Deservers issue. I think it does make sense, but when I though about it, the inheritance of classes makes it complicated.
During publishing following error had shown to me.
|
And Trackpoints also crashing:
|
I've added support for Mocha Pro 2025 as the above error was caused by it. Unfortunately the exportes are renamed and there is no unique identifier for each exporter so to support them, I had to add separate exporter name mappings. But this now work for 2025 and 2024.5 and it should take much effort to add other versions if needed. |
This PR adds documentation ynput/ayon-documentation#336 |
Changelog Description
This PR is adding basic functionality of the addon + in host AYON menu, working workfile tool, and pipeline API implementation. Adding support for publishing tracking data for all available tracking data exporters in Mocha. You can set if you want to publish for selected layers or for all, you can also set exporter options. All formats will be added as representation for product per layer. Adds support for publishing of shape data in similar fashion as tracking data.
Additional review information
Some exporters produce mulitple files, those will be published as resources and their manifest (list of them) will be main representation file.
Stubs
I've auto-generated stubs from mocha python api using
mypy
stubgen but it lack most type hints and there is some confusion inside to (named arguments in documentation are in fact not named, etc.) I am enhancing the stubs whenever I hit that particular function to help with further development. To use those stubs in PyCharm, just add them to the interpreter paths. Not sure how this is done in VSCode.Warning
This needs other opened PRs to work;
Note
Closes: #4
Closes: #3
TODO:
Notes
opening projects
It seems that Mocha doesn't support opening of project workfile in the current running instance via Python. You can work with them on API level, but there is probably no way to load the project to the current running instance of Mocha Pro. This hinders Workfile tool functionality unfortunately. So whenever you open new workfile via Workfile tool, it will re-run Mocha and close the old instance. The same thing will happen on save.
default tracking clips
There is also no way to set more than one default tracking clip per project and you cannot rename it. So there is two types of loaders, one to load "standard" clip and the other one that will replace the path in the default tracked clip.