Skip to content

Add "Open source workfile" loader action#128

Draft
BigRoy wants to merge 12 commits into
ynput:developfrom
BigRoy:enhancement/add_open_source_workfile_action
Draft

Add "Open source workfile" loader action#128
BigRoy wants to merge 12 commits into
ynput:developfrom
BigRoy:enhancement/add_open_source_workfile_action

Conversation

@BigRoy
Copy link
Copy Markdown
Member

@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

Fix: ynput/ayon-core#1635

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
Member 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.

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.

It might be reused for this case as it is already showing the list of applications we can. @iLLiCiTiT what do you think? Or we're better sticking with ActionForm instead?


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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

If that can work - sounds good to me.

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
Member 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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Let's try to live with:

  • if not source: return False
  • if source.startswith("{root"): ...
  • elif os.path.exists(source): ... then assuming it's a valid source workfile?

@BigRoy BigRoy assigned moonyuet and unassigned BigRoy May 16, 2026
Comment thread client/ayon_applications/plugins/load_actions/open_source_workfile.py Outdated
from ayon_applications.manager import Application


class OpenSourceWorkfileAction(LoaderSimpleActionPlugin):
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.

BTW this would not work with project bundle. It would have to be webaction.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The action should be able to trigger an app launch into the valid project bundle. Is the only reason it's currently not working just because we're not going through CLI, or?

As in, would this fix it: https://github.com/ynput/ayon-applications/pull/128/changes#r3264305267

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.

The list of applications can be different. If you're using ApplicationsManager to get list of applications it is not 100% project bundle support.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The list of applications can be different. If you're using ApplicationsManager to get list of applications it is not 100% project bundle support.

I see - that makes sense. Can we make it display the right ones instead? 🤔

Copy link
Copy Markdown
Member

@iLLiCiTiT iLLiCiTiT May 19, 2026

Choose a reason for hiding this comment

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

Right now there is #139 I can add one endpoint for the project so it will get all available applications, but that won't have information about extensions...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Right now there is #139 I can add one endpoint for the project so it will get all available applications, but that won't have information about extensions...

That's because it may not access that version of the addon in the current bundle? 🤔

Perhaps we shouldn't overcomplicate things. The best case scenario is that it's able to at least find the relevant source application in the versions metadata - and with that by default pick the actual valid application to use from settings as the pre-selected entry. I'd rather have it show an app version too many, than none showing at all so maybe just taking from studio settings is the valid approach here? (Was applications addon even overridable per-project?)

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 YN-0365: Go to workfile from published content

3 participants