Nuke will always launch a new instance of itself if you are not opening the script from a blank nuke instance. So if you put some code after the open command, it won't be executed in the new nuke session but in the old one. So if you want to add a favorite dir to your script, you can do it with a nuke.addOnScriptLoad.
If you don't want to open a new nuke instance, you would have to nuke.clear() the script first, but I always had bugs in previouss version of nuke with this command. Always ended with the "not attached to a node" problem Hope this helps in some ways On Tue, May 1, 2012, at 13:34, Howard Jones wrote: Hi I've set up a script to load a shot through a panel, which is fine, and am using # OPEN SCRIPT nuke.scriptOpen(os.path.join(scriptsDir,script)) Then I am trying to set the directory paths using nuke.addFavoriteDir(name = shot,directory = nukeDir,type = nuke.IMAGE+nuke.GEO) but what happens is I end up with an untitled script with the favorites added and nothing in the new loaded script. What I'd like is no untitled script and the favorites in the newly opened script. what am I doing wrong? Thanks Howard _______________________________________________ Nuke-python mailing list [1][email protected], [2]http://forums.thefoundry.co.uk/ [3]http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke- python References 1. mailto:[email protected] 2. http://forums.thefoundry.co.uk/ 3. http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python -- Hugo Léveillé TD Compositing, Vision Globale [email protected]
_______________________________________________ Nuke-python mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
