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

Enhancement: Provide optionality for pre launch hooks #6112

Open
2 tasks done
kalisp opened this issue Jan 8, 2024 · 2 comments
Open
2 tasks done

Enhancement: Provide optionality for pre launch hooks #6112

kalisp opened this issue Jan 8, 2024 · 2 comments
Assignees
Labels
type: enhancement Enhancements to existing functionality

Comments

@kalisp
Copy link
Member

kalisp commented Jan 8, 2024

Is there an existing issue for this?

  • I have searched the existing issues.

Please describe the feature you have in mind and explain what the current shortcomings are?

There is no way how to configure triggering state for pre launch hooks in the Settings, imho.

It might be good to provide functionality to disable some pre-launch hooks if necessary.

How would you imagine the implementation of the feature?

I don't think it is completely necessary for PreLaunchHook to mimic regular plugins (that Settings would be applied automatically).
It might be enough to figure out:

  • where to put configuration for pre-launch hook to the Settings
  • provide example how to access Setting (might not be so simple, maybe)

Are there any labels you wish to add?

  • I have added the relevant labels to the enhancement request.

Describe alternatives you've considered:

No response

Additional context:

No response

[cuID:OP-7979]

@kalisp kalisp added the type: enhancement Enhancements to existing functionality label Jan 8, 2024
@BigRoy
Copy link
Collaborator

BigRoy commented Jan 8, 2024

  • provide example how to access Setting (might not be so simple, maybe)

The hooks have access to e.g. self.data["project_settings"] - would that suffice?
Currently some hooks do check e.g. settings I believe to skip itself for certain scenarios. Something like:

class MyLaunchHook(..):
    def execute(self):
        if not self.data["project_settings"]["myfeature_enabled"]:
            return

@mkolar
Copy link
Member

mkolar commented Feb 8, 2024

I think this would cover the scenario if you wanted to make a hook optional. This would be good to add to dev docs on ayon.ynput.io.

@kalisp maybe you could tackle it considering you've opened this up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Enhancements to existing functionality
Projects
None yet
Development

No branches or pull requests

8 participants