ID 378856 - Preferences Views option overrides Root View KnobDefaults within init

Follow

Problem summary
Within Nuke's .nuke plugin directory, users are able to set their Root Views KnobDefaults within their ~/.nuke/init.py file location,

With the Nuke11.3v1 release, users no longer receive the Root View KnobDefaults.

This appears to be due to the new 'Views' preferences option:


Unfortunately, there currently is no way to set the Preferences node with Python, users must manually open the preferences and change it on their first launch.


Customer reported version
nuke.11.3v1

Customer reported platform
fedora

Steps to reproduce

1) Add the following to your ~/.nuke/init.py file location:

nuke.knobDefault('Root.views', 'L #ff0000\nR #00ff00\n')nuke.knobDefault('Root.views_colours', 'true')

2) Open Nuke11.2v5 and notice that the Viewer has 2 Views  ( L & R )

3) Open Nuke11.3v1

Result: The Viewer will only display the default views ( Main ).

 Users must change the preferences manually in nuke for future projects.


Workaround
Users can set up their default views with the Preferences -> Views options.​
 
Alternatively, putting the following code in the init.py also seems to set stereo views correctly:

def stereoViews(): nuke.root().knob('views').fromScript( '\n'.join( ('left #ff0000', 'right #00ff00') ) ) nuke.knobDefault('Root.views', '\n'.join(('left #ff0000', 'right #00ff00')))nuke.addOnCreate(stereoViews, nodeClass='Root')

Reproduced by support

This bug has been reproduced in:
Nuke11.3v1 - Windows 7 - Mac10.13 - CentOS7 - regression

Unable to reproduce bug in:
Nuke11.2v5 - Windows 7 - Mac10.13 - CentOS7

Earliest version tested
- This feature did not exist before this version ( Preferences Views settings )

Expected behaviour
Nuke should use the knob defaults specified by the user within the init.py

Actual behaviour
Two different Views options are clashing ( Root and Preferences ), causing confusion.

    We're sorry to hear that

    Please tell us why