If you have some way of injecting a line into the nuke script you can add the
tcl command before the root node:
....
</layout>
}
plugin_appendpath "/u/truant/mygizmos"
Root {
inputs 0
....
but it isn't retained after saving..so, not so great. But maybe there is some
way to save that line.
----- Original Message -----
| From: "Fredrik Averpil" <[email protected]>
| To: "Nuke Python discussion" <[email protected]>
| Sent: Thursday, August 25, 2016 3:08:25 AM
| Subject: [Nuke-python] Executing nuke.pluginAppendPath on script open
| Hi,
| I’ve got a project which contains a “gizmos” folder. In order to make
| my .nk script realize that this folder exists and that it should be
| used I can run: import nuke
| nuke.pluginAppendPath(GIZMOS_PATH)
| I currently have this in my init.py file so that this happens
| automatically.
| Now to my question:
| I need to make this script find the gizmos even if the init.py file
| doesn’t exist. Is there any way I can bundle this code in my .nk
| script and make it run just before the script is being parsed, so
| that any gizmos are found and used?
| Cheers!
| // Fredrik
|
| _______________________________________________
| Nuke-python mailing list
| [email protected],
|
https://urldefense.proofpoint.com/v2/url?u=http-3A__forums.thefoundry.co.uk_&d=DQICAg&c=hHkK43hKb5uKUGaYMJ-p252cFdfVBHtyegDvswk59fU&r=hdh6ldFziktt1N0wAi7bK3Mjov-6LjULd6ZgRd44U6s&m=DPt6dXgXvUiQLcxJl5gNqPNm2t1JhTJXBVm9XlAPjUo&s=xIx0woVzFFcak3s-RsbYt5HzIJnp9NuDkA2QNKOcJco&e=
|
https://urldefense.proofpoint.com/v2/url?u=http-3A__support.thefoundry.co.uk_cgi-2Dbin_mailman_listinfo_nuke-2Dpython&d=DQICAg&c=hHkK43hKb5uKUGaYMJ-p252cFdfVBHtyegDvswk59fU&r=hdh6ldFziktt1N0wAi7bK3Mjov-6LjULd6ZgRd44U6s&m=DPt6dXgXvUiQLcxJl5gNqPNm2t1JhTJXBVm9XlAPjUo&s=hNzDCAKi4R6J0H9SLkk2heiuPjREo15kC5pSKeDK724&e=
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python