🏛️Product base types: Product types and base types#83
🏛️Product base types: Product types and base types#83
Conversation
rdelillo
left a comment
There was a problem hiding this comment.
Tested locally, the following worked with the change I've suggested:
- publish shot clip (create + publish)
- editorial package (create + publish)
- workfile (create + publish)
- load clip
- load editorial package
- load media
client/ayon_resolve/api/plugin.py
Outdated
| self.product_name = self.product_type + self.variant.capitalize() | ||
| # create product name for publishing | ||
| # TODO: Use creator `get_product_name` to correctly define name | ||
| self.product_name = self.product_base_type + self.variant.capitalize() |
There was a problem hiding this comment.
I had to revert this to make it work for me. Not sure if this is right but PublishableClip.product_base_type does not exist.
| self.product_name = self.product_base_type + self.variant.capitalize() | |
| self.product_name = self.product_type + self.variant.capitalize() |
There was a problem hiding this comment.
Changed product_type to plate_product_type which is what it actually holds.
client/ayon_resolve/api/plugin.py
Outdated
|
|
||
| self.hierarchy_data = { | ||
| key: get(key) or self.timeline_item_default_data[key] | ||
| key: get(key, self.timeline_item_default_data[key]) |
There was a problem hiding this comment.
This might not be related but this is happening to me now:
Traceback (most recent call last):
File "C:\CODE\__YNPUT\ayon-core\client\ayon_core\pipeline\create\context.py", line 2344, in _create_with_unified_error
result = creator.create(*args, **kwargs)
File "C:\CODE\__YNPUT\ayon-resolve\client\ayon_resolve\plugins\create\create_shot_clip.py", line 617, in create
publish_clip = PublishableClip(
File "C:\CODE\__YNPUT\ayon-resolve\client\ayon_resolve\api\plugin.py", line 407, in __init__
self._populate_attributes()
File "C:\CODE\__YNPUT\ayon-resolve\client\ayon_resolve\api\plugin.py", line 502, in _populate_attributes
self.hierarchy_data = {
File "C:\CODE\__YNPUT\ayon-resolve\client\ayon_resolve\api\plugin.py", line 503, in <dictcomp>
key: get(key, self.timeline_item_default_data[key])
KeyError: 'folder'
There was a problem hiding this comment.
Actually looking into code, I am not sure how this could work before. The default value points only to _folder_
- Change hierarchy data lookup to use underscore-prefixed keys with fallback to empty string - Use plate_product_type instead of product_base_type for product name - Extract product type enum creation into _add_product_type_enum method - Remove trailing whitespace
jakubjezek001
left a comment
There was a problem hiding this comment.
I could not resist to commit some enhancements and fixes @iLLiCiTiT appologize for interfering with your great work. This was working for me and the position at Creator attributes is much better this way.
client/ayon_resolve/api/plugin.py
Outdated
| self.product_name = self.product_type + self.variant.capitalize() | ||
| # create product name for publishing | ||
| # TODO: Use creator `get_product_name` to correctly define name | ||
| self.product_name = self.product_base_type + self.variant.capitalize() |
There was a problem hiding this comment.
| self.product_name = self.product_base_type + self.variant.capitalize() | |
| self.product_name = self.plate_product_type + self.variant.capitalize() |
this is inherited from https://github.com/ynput/ayon-resolve/pull/83/changes#diff-dbca93e0046aac9618a03741fb59f6e8795e66126b815774e9eaa88f1edfc3adR492
client/ayon_resolve/api/plugin.py
Outdated
|
|
||
| self.hierarchy_data = { | ||
| key: get(key) or self.timeline_item_default_data[key] | ||
| key: get(key, self.timeline_item_default_data[key]) |
There was a problem hiding this comment.
Actually looking into code, I am not sure how this could work before. The default value points only to _folder_
Changelog Description
Use product base types and add support for product types used as aliases.
Additional review information
Codebase of Resolve addon is fully using product base type as "pipeline" type and product type as an alias. Load plugins define
product_base_typesfor filtering, create plugins do defineproduct_base_typeand the whole logic is expecting that product base type is being used in the system.Shot create plugin have option to define custom product types for plate and audio instances.
Side changes:
apply_settingsto the only create plugin which actually uses it.CreatorandPublishClip).Testing notes:
This is untested PR from my side, please make sure it is fully reviewed.
Basics
Product types