I already do that, forgot to include that code: nuke.addOnUserCreate(setupOcioConfigPath, nodeClass='Root')
The problem is with addOnScriptLoad actually. If I open a script where ocio is not configed it don't update the viewerprocesses. If I open a blank script it works as expected as then addOnUnserCreate is executed. // E On Tue, Mar 29, 2016 at 7:18 PM, Charles Taylor <[email protected]> wrote: > You should be able to filter your addOnUnserCreate callback to only fire > on the creation of the root node, does that help? > > c > > > > On 03/29/2016 01:09 PM, Erik Johansson wrote: > > If added with addOnUserCreate callback it works but not with > addOnScriptLoad (I wan't to force the setting for everyone so scripts where > it is not setup get configured correctly). > > On Tue, Mar 29, 2016 at 6:45 PM, Erik Johansson <[email protected]> > wrote: > >> I set up our OCIO config as: >> >> r = nuke.root() >> r['customOCIOConfigPath'].setValue(os.environ['OCIO_CONFIG_PATH']) >> r['defaultViewerLUT'].setValue('OCIO LUTs') >> r['OCIO_config'].setValue('custom') >> >> If I run it in the script editor it works as expected and available >> viewerProcesses are updated to whats in the config file. >> >> If I however put it in menu.py instead it still shows the nuke default >> viewerProcesses. >> >> How can I trigger a refresh? >> >> // Erik >> >> > > > > -- > > > *Erik Johansson **Pipeline TD* > > > *Fido *Rosenlundsgatan 40 > 118 53 Stockholm, Sweden > www.fido.se > > > _______________________________________________ > Nuke-python mailing [email protected], > http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > > > > _______________________________________________ > Nuke-python mailing list > [email protected], http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > > -- *Erik Johansson**Pipeline TD* *Fido*Rosenlundsgatan 40 118 53 Stockholm, Sweden www.fido.se
_______________________________________________ Nuke-python mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
