There is no callback that runs before a script is about to be loaded. I have requested this several times in order to allow an OCIO config to be assigned based on the incoming script path, but it has not yet been implemented.
If you want to add your voice to the existing support ticket, it is #32400. -Nathan From: Lev Kolobov Sent: Tuesday, May 17, 2016 10:56 AM To: Nuke-python@support.thefoundry.co.uk Subject: [Nuke-python] Open Comp Path Value Greetings, Right after user go to File>Open Comp and select any .nk script, I would like to message user following: "Hello dear, you are about to load ../../../....nk script?" I got this script in menu.py: def path_check(): nuke.message ('Hello, you are about to load %s script?' % nuke.root().knob('name').value()): nuke.addOnScriptLoad(path_check) It comes empty.... I guess nuke.root().knob('name').value() is not define yet... Any suggestion how can I know what path Nuke is about to load? This is just a simple example, I do not want just to "message" user. I want for example take a path, split it and set global os.environ before opening nuke script. Thank you, Lev
_______________________________________________ Nuke-python mailing list Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python