Add "Open source workfile" loader action#128
Conversation
… from the standalone browser
… word 'traypublisher' Similarly - error accordingly if the source filepath does not exist
| preferred_index = i | ||
| label += " (used to create publish)" | ||
|
|
||
| # TODO: Show application icon if available |
There was a problem hiding this comment.
We may want to use a dedicated re-usable dialog here? Something matching the choose app logic in terminal launch code.
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
I would say that this should not use Qt at all, but ActionForm instead.
There was a problem hiding this comment.
If that can work - sounds good to me.
| if version.get("attrib", {}).get("source"): | ||
| return True |
There was a problem hiding this comment.
I think that all hosts do fill source, but it does not have to be workfile (e.g. traypublisher).
| if version.get("attrib", {}).get("source"): | |
| return True | |
| source = version.get("attrib", {}).get("source") | |
| if source and source.starswith("{root"): | |
| return True |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Let's try to live with:
if not source: return Falseif source.startswith("{root"): ...elif os.path.exists(source): ...then assuming it's a valid source workfile?
| from ayon_applications.manager import Application | ||
|
|
||
|
|
||
| class OpenSourceWorkfileAction(LoaderSimpleActionPlugin): |
There was a problem hiding this comment.
BTW this would not work with project bundle. It would have to be webaction.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
The list of applications can be different. If you're using ApplicationsManager to get list of applications it is not 100% project bundle support.
There was a problem hiding this comment.
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? 🤔
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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?)
…ll-workfile-path Launch cli: Allow to pass any workfile path to launch
Changelog Description
Add action to open source workfile that created the publish, directly from the standalone browser
Additional review information
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: