Skip to content

🏛️Product base types: Product types and base types#83

Open
iLLiCiTiT wants to merge 27 commits intodevelopfrom
enhancement/product-base-types
Open

🏛️Product base types: Product types and base types#83
iLLiCiTiT wants to merge 27 commits intodevelopfrom
enhancement/product-base-types

Conversation

@iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented Mar 5, 2026

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_types for filtering, create plugins do define product_base_type and 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:

  • Moved override of apply_settings to the only create plugin which actually uses it.
  • Removed some backwards compatibily (classes Creator and PublishClip).
  • Use 'product' instead of 'subset'.
  • Marked base classes to be skipped during discovery.
  • Don't use "safe getters" for settings to make sure settings are actually used.

Testing notes:

This is untested PR from my side, please make sure it is fully reviewed.

Basics

  1. Use ayon-core >= 1.8.0 or current develop if is not released yet.
  2. Upload the addon to server to use new settings model.
  3. Existing workfiles should load up and should be possible to publish.
  4. Creating new instances should work as expected.

Product types

  1. Define product types for plate and audio in settings.
  2. Publisher should show selection of them in pre-create attributes.
  3. Create them.
  4. Product name should use the product type in name (if template defines that).
  5. Publish the instances.
  6. Loader tool should show the product type and product base type in UI.

@iLLiCiTiT iLLiCiTiT added bump minor type: enhancement Improvement of existing functionality or minor addition labels Mar 5, 2026
@iLLiCiTiT iLLiCiTiT self-assigned this Mar 5, 2026
@iLLiCiTiT iLLiCiTiT requested a review from jakubjezek001 March 5, 2026 16:03
Copy link
Contributor

@rdelillo rdelillo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
self.product_name = self.product_base_type + self.variant.capitalize()
self.product_name = self.product_type + self.variant.capitalize()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed product_type to plate_product_type which is what it actually holds.


self.hierarchy_data = {
key: get(key) or self.timeline_item_default_data[key]
key: get(key, self.timeline_item_default_data[key])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually looking into code, I am not sure how this could work before. The default value points only to _folder_

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in the commit

- 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
Copy link
Member

@jakubjezek001 jakubjezek001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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


self.hierarchy_data = {
key: get(key) or self.timeline_item_default_data[key]
key: get(key, self.timeline_item_default_data[key])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually looking into code, I am not sure how this could work before. The default value points only to _folder_

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bump minor type: enhancement Improvement of existing functionality or minor addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants