Help with tk-nuke bootstrap

Hey folks,
I’m trying to wrap my head around the bootstrap logic of tk-nuke for all of the different nuke dcc’s. The goal is to separate the startup env vars for nuke and hiero in this engine for better differentiation.
The engine.py states that “tk-nuke/python/startup/bootstrap.py” is the first bit of logic that will be executed.
However in my case this is never executed as far as i can tell.

Can someone maybe shed some light on the bootup process for tk-nuke?

4 Likes

Hey @tonyd,

Check out this doc about bootstrapping;

Should get you started on the topic, not sure if you’ve seen all of our documentation. Hopefully someone more versed in the subject can get into specifics

3 Likes

Cool… haven’t found this one yet. Thanks David :slight_smile:

2 Likes

Hi @tonyd,

Have you checked out the hooks before_app_launch.py or app_launch.py? might be a place to set those envars with logic there?

-David

2 Likes

briefly… I also thought to set NUKE_PATH and HIERO_PLUGIN_PATH to something that fits my needs from there.
But I wanted to understand where and how those variables are set by default and hook in from there

2 Likes

Hey @tonyd

tk-nuke sets those env vars in the startup.py, which gets called by the tk-multi-launchapp when launching Nuke. But I wouldn’t recomend taking over the engine to modify them here. As @DavidMason mentioned, setting them in the before_app_launch.py would be a better way to go I think.

2 Likes