Ensure Nuke host get installed in terminal mode.#206
Conversation
BigRoy
left a comment
There was a problem hiding this comment.
Overall the changes look good.
But @LiborBatek (and @rdelillo or @jakubjezek001) can you please test this on the farm rendering. The way I understand this will now trigger the installation of AYON on the farm I suspect. And with that, it'll now possibly trigger any of the registered callbacks or startup logic - and we'll want to ensure that e.g. none of the "check inventory versions" or "on_script_load" callbacks get in the way and suddenly start altering the scene.
E.g. set_context_settings may now trigger and actually end up triggering reset_resolution or reset_frame_range_handles etc.
With that now all being present this may affect nuke render speeds on the farm slightly because it may now start performing more AYON logic in the headless modes?
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
I looked into it some more today total cost for all callbacks is about 4-5 seconds maximum.
I've tested those changes locally and in both Deadline and RoyalRender. |
|
I still have my concerns about the callbacks triggering in e.g. terminal mode and likely on renders as well. See e.g. Launching with file Launching without file Notice how launching with file does a lot of the logic twice, which hints to me that the second run of logic runs inside the opened workfile. And if the workers now start opening the scenes and start adjusting format, colorspaces, etc. then suddenly it'd be changing the workfile on the farm before it initiates the render. That sounds like a no-go really. It shouldn't be touching the scene bits at all? |
@BigRoy just to be sure I understand you correctly, are you suggesting we should just drop this and not have any of the callbacks called by default in terminal mode ? The initial issue was flagged here: https://github.com/ynput/ayon-sn4/pull/57 ayon-nuke/client/ayon_nuke/api/lib.py Line 1595 in 2d5b203 And the fix was to ensure we got colorspace related callbacks called. |
I'd say there's a difference between setting up Nuke for AYON, and changing a workfile that you open. What we should have is that:
The question regarding "Otherwise OCIO environment might not be properly intialized." is. Why wouldn't it? Isnt' that all |
Yes one thing is to set OCIO via callback, but then another callback is setting up correct settings for colormanagement set in workfile (ayon+settings://nuke/imageio/workfile) settings. Because the default nuke settings on colorspace might not be exactly the same as a project settings. |
We're not discussing the 'defaults' of Nuke. I'm fine with adjusting Nuke's defaults - we just shouldn't automatically change an opened workfile. That'd mean you couldn't open files without them being 'broken' (converted) without your knowledge. Especially on the farm that's not something we'd want. |
|
Let's default now to setting up none of the scene altering callbacks in headless mode - that should match the previous behavior where we did nothing on the farm. Then make an issue to track this remainder discussion. That way we can at least patch up the terminal side of things here. |
I've rework this PR so it only setup callbacks in GUI mode. |
BigRoy
left a comment
There was a problem hiding this comment.
Looks good to me - @jakubjezek001 can you confirm and merge if ok please?
…ynput/ayon-nuke into enhancement/188_nuke_host_terminal_mode
jakubjezek001
left a comment
There was a problem hiding this comment.
This is working but without the callback my batchdelivery workfow is failing.
Just to be sure, this is not new right ? I should fail the same way with current |
at the end all is fine. I will need to fix some issues in batch delivery, but this is unrelated. |

Changelog Description
Fixes: #188
Changes:
Testing notes: