Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launcher: Use selection object for action #306

Merged
merged 8 commits into from
Mar 28, 2024

Conversation

iLLiCiTiT
Copy link
Member

Changelog Description

Prepared selection object that helps to handle selection in Launcher actions.

Additional info

The object should backwards compatible for unconverted actions.

Testing notes:

  1. Launcher actions are working (e.g. applications)
  2. It would be nice to test backwards compatibility of uncorverted actions but I don't have any.

@ynbot ynbot added size/S type: enhancement Improvement of existing functionality or minor addition labels Mar 28, 2024
Comment on lines +40 to +42
project_entity=None,
folder_entity=None,
task_entity=None
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you point me to where we're actually setting these from the launcher? I can't seem to find that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Nowhere.

Copy link
Collaborator

Choose a reason for hiding this comment

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

In that case - we shouldn't expose it as if it'll be available? :) Or will you be adding commits to fix it? :)

Copy link
Collaborator

@BigRoy BigRoy Mar 28, 2024

Choose a reason for hiding this comment

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

Ah wait, I only now see that it queries it whenever you access it. Nevermind. I'm blind.

Should maybe stab myself in the eye with a fork to wake me up.

Copy link
Member Author

Choose a reason for hiding this comment

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

Why not? It might be used for testing.

@BigRoy
Copy link
Collaborator

BigRoy commented Mar 28, 2024

Launcher actions are working (e.g. applications)

Confirmed.

It would be nice to test backwards compatibility of uncorverted actions but I don't have any.

This plugin doesn't seem to get listed for me.

Using the .get method gives me:

AYON_TASK_NAME None
AYON_FOLDER_PATH None
AYON_PROJECT_NAME ayontest

Even when I have a folder and task selected.


By the way, if for whatever reason you iterate the object I get this:

    for key in session:
  File "E:\dev\ayon-core\client\ayon_core\pipeline\actions.py", line 71, in __getitem__
    raise KeyError(f"Key: {key} not found")

Which seemed confusing. The old dict could be iterable. (Not that I've really used that, just by accident now iterated the new object as I was debugging)

@iLLiCiTiT
Copy link
Member Author

This plugin doesn't seem to get listed for me.

Should be fixed

Copy link
Collaborator

@BigRoy BigRoy left a comment

Choose a reason for hiding this comment

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

My custom actions now show up and launch ok. 👍

BigRoy added a commit to BigRoy/ayon-colorbleed that referenced this pull request Mar 28, 2024
@iLLiCiTiT iLLiCiTiT merged commit 66dc155 into develop Mar 28, 2024
1 check failed
@iLLiCiTiT iLLiCiTiT deleted the enhancement/launcher-selection-object branch March 28, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S type: enhancement Improvement of existing functionality or minor addition
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants