Add the options to enable context and its related settings - #336
Conversation
…during certain callbacks.
…ngs' of https://github.com/ynput/ayon-nuke into enhancement/decouple_callback_for_general_context_settings
…_context_settings
…cript create and on script load.
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
rdelillo
left a comment
There was a problem hiding this comment.
Approving this one cause it works as expected and it's very convenient to be able to switch callbacks individually like that 💪
Tested on Nuke 17.0, I disabled callbacks on create and enabled on open.
Small Notes:
- Need to fix the lint
- Is it a problem to always register 1 big function as callback that read the settings vs add granular functions as callbacks based on settings ? I don't see any issue and maybe safer for now, but just want to mention it.
Not sure if there is any reason behind adding those functions explicitly as callbacks before. But in general(like in other hosts), we added the callback with its related function (new_callback would trigger the |
A problem in which way? I don't really see any issues with it either way. I prefer myself to just register a single thing to the DCC and then keep things in AYON land where we control it our way instead. If any of these ever need to run in a certain order, etc. we then know which order it's running in - if we register them with Nuke, I wouldn't know for example. |
BigRoy
left a comment
There was a problem hiding this comment.
LGTM - just refactor on_root_load -> on_script_load.
Changelog Description
This PR is to add the options to enable and its related settings through the addon settings.
Throughout this PR, users can also choose whether enabling to set context settings during callbacks.
Additional review information
Marked it as draft, we need to discuss whether better designs for the setting needed for this.
Testing notes:
ayon+settings://nuke/general/settings_to_applyin AYON server