Skip to content

Publisher instances sort by folder path and product name and fix shif…#1802

Open
rischpierre wants to merge 2 commits into
ynput:developfrom
rischpierre:develop
Open

Publisher instances sort by folder path and product name and fix shif…#1802
rischpierre wants to merge 2 commits into
ynput:developfrom
rischpierre:develop

Conversation

@rischpierre

Copy link
Copy Markdown

Changelog Description

Hello, I noticed a bug on the Publisher regarding the order of instances and the mutlitple selection in the case of multishot workflow.
I did not saw any issue regarding this, so I created this MR directly
here is the bug ( you can see the selection is messed up)
Peek 2026-04-15 09-20

and after this fix
Peek 2026-04-15 09-44

I also sorted the instances by shot and then product name so it is easier for the artists.

Testing notes:

  1. Open a DCC (gaffer in my case) with multiple shot publisher nodes containing different shots
  2. ctrl+click select the instances

@ynbot ynbot added the size/XS label Apr 22, 2026
Comment thread client/ayon_core/tools/publisher/widgets/card_view_widgets.py Outdated
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
for instance in instances:
for instance in sorted(
instances_by_group[group_name],
key=lambda i: (i.get_folder_path() or "", i.product_name))

@iLLiCiTiT iLLiCiTiT Apr 22, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just realized this is InstanceItem not CreatedInstance.

Suggested change
key=lambda i: (i.get_folder_path() or "", i.product_name))
key=lambda i: (i.folder_path or "", i.product_name))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Still same question, why this was moved here? It makes more sense to sort them in _update_instance_widgets if possible.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants