Skip to content

Add "Open source workfile" loader action#128

Draft
BigRoy wants to merge 6 commits intoynput:developfrom
BigRoy:enhancement/add_open_source_workfile_action
Draft

Add "Open source workfile" loader action#128
BigRoy wants to merge 6 commits intoynput:developfrom
BigRoy:enhancement/add_open_source_workfile_action

Conversation

@BigRoy
Copy link
Copy Markdown
Contributor

@BigRoy BigRoy commented Jan 28, 2026

Changelog Description

Add action to open source workfile that created the publish, directly from the standalone browser

Additional review information

image image

is it me or should the cancel and open buttons be swapped around?

This may solve ticket YN-0365 and could act as a usable fix for ynput/ayon-core#1635 even though it's not exactly the same.

Quite a few TODOs in the code to discuss stilll, hence draft for now - yet still good to discuss overall approach.

Fix #137

Testing notes:

  1. Open Tray browser
  2. Try to open source workfile for any existing publishes.

… word 'traypublisher'

Similarly - error accordingly if the source filepath does not exist
@BigRoy BigRoy requested review from antirotor and iLLiCiTiT January 28, 2026 22:33
@BigRoy BigRoy self-assigned this Jan 28, 2026
@BigRoy BigRoy added type: enhancement Improvement of existing functionality or minor addition sponsored This is directly sponsored by a client or community member labels Jan 28, 2026
preferred_index = i
label += " (used to create publish)"

# TODO: Show application icon if available
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We may want to use a dedicated re-usable dialog here? Something matching the choose app logic in terminal launch code.


return compatible

def _show_app_dialog(
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.

I would say that this should not use Qt at all, but ActionForm instead.

Comment on lines +46 to +47
if version.get("attrib", {}).get("source"):
return True
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.

I think that all hosts do fill source, but it does not have to be workfile (e.g. traypublisher).

Suggested change
if version.get("attrib", {}).get("source"):
return True
source = version.get("attrib", {}).get("source")
if source and source.starswith("{root"):
return True

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've seen some being other values indeed - like source image sequences with %d in the source path, and also just the word traypublisher. I'll think for a bit whether I like the {root requirement - it does make sense for the cases we do kind of know what it should be like.

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

Labels

sponsored This is directly sponsored by a client or community member type: enhancement Improvement of existing functionality or minor addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

YN-0441: Open Source Workfile action in the Loader

2 participants