This is a bug that was introduced back when Nuke 9 was released. Surprised
it's still there. I got a reply that people were working on it over a year
ago.

"Bug 46687 - [Regression] LUT: defaultViewingLUT knob not being picked up
(defined in menu.py)"

Best regards,
Simon



-------------------------------
Simon Björk
Compositor/TD

+46 (0)70-2859503
www.bjorkvisuals.com

2016-03-30 20:45 GMT+02:00 Daniel Stein <daniel.st...@thefoundry.co.uk>:

> Try calling register_viewers() along with setting the defaultViewerLUT.
>
> nukescripts.ViewerProcess.register_viewers(defaultLUTS=False,
> ocioConfigName='/path/to/your/config.ocio')
>
>
>
>
> On 29 March 2016 at 18:26, Erik Johansson <erik.johans...@fido.se> wrote:
>
>> Tried nuke.knobDefault('Root.defaultViewerLUT', 'OCIO LUTs') but still no
>> luck
>>
>> On Wed, Mar 30, 2016 at 12:14 AM, Erik Johansson <erik.johans...@fido.se>
>> wrote:
>>
>>> Unfortunately same result with adding nodeClass :/
>>>
>>> It sets all knobs correctly but Nuke don't refresh the viewer processes
>>>
>>> On Tue, Mar 29, 2016 at 7:41 PM, Charles Taylor <ctay...@spinvfx.com>
>>> wrote:
>>>
>>>> Oh, ok, right, I think you want addOnCreate(setupOCIO,
>>>> nodeClass='Root').
>>>>
>>>> That's always called, no matter why the node is created.
>>>>
>>>> c
>>>>
>>>>
>>>> On 03/29/2016 01:27 PM, Erik Johansson wrote:
>>>>
>>>> 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 <ctay...@spinvfx.com>
>>>> 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 <
>>>>> erik.johans...@fido.se> 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 listnuke-pyt...@support.thefoundry.co.uk, 
>>>>> http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>>
>>>> *Erik Johansson **Pipeline TD*
>>>>
>>>>
>>>> *Fido *Rosenlundsgatan 40
>>>> 118 53 Stockholm, Sweden
>>>> www.fido.se
>>>>
>>>>
>>>> _______________________________________________
>>>> Nuke-python mailing listnuke-pyt...@support.thefoundry.co.uk, 
>>>> http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>>
>>> *Erik Johansson**Pipeline TD*
>>>
>>>
>>> *Fido*Rosenlundsgatan 40
>>> 118 53 Stockholm, Sweden
>>> www.fido.se
>>>
>>
>>
>>
>> --
>>
>>
>> *Erik Johansson**Pipeline TD*
>>
>>
>> *Fido*Rosenlundsgatan 40
>> 118 53 Stockholm, Sweden
>> www.fido.se
>>
>> _______________________________________________
>> 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
>>
>
> _______________________________________________
> 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
>
>
_______________________________________________
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

Reply via email to