-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathpreferences.py
More file actions
47 lines (41 loc) · 1.42 KB
/
preferences.py
File metadata and controls
47 lines (41 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import nuke
# Set default Nuke preferences
# Suggested defaults that can be overriden by the artist
preferences_knobdefaults = {
'platformPathRemaps': '',
'colorPickerDefaultMode': '1',
'UISequenceDisplayMode': r'Printf Notation (\%d)',
'ShadeDAGNodes': 'false',
'postage_stamp_mode': 'Static frame',
'TileWidth': '80',
'TileHeight': '18',
'GridWidth': '120',
'GridHeight': '30',
'SnapToGrid': 'true',
'show_grid': 'true',
'OverlayColor': '0x1e1e1eff',
'InputArrowSize': '18',
'ArrowheadLength': '6',
'ArrowheadWidth': '6',
'ArrowWidth': '1',
'rgb_only': 'true',
'defaultBufferDepth': 'half-float',
'defaultGPUForViewer': 'true',
'defaultGPUForInputs': 'true',
'dot_node_scale': '1',
'Viewer3DControlEmulation': 'Maya',
'UIRotoLineWidth': '0.5',
'UIRotoDrawShadow': 'true',
'scopesApplyViewerColorTransform': 'false',
'scopesForceFullFrame': 'true',
'defaultFlipbook': 'Flipbook Viewer',
}
# Forced defaults that cannot be persisted by the artist
preferences_forced = {
'dot_node_scale': '1',
}
prefs = nuke.toNode('preferences')
for knob, val in list(preferences_knobdefaults.items()):
nuke.knobDefault('preferences.{0}'.format(knob), val)
for knob, val in list(preferences_forced.items()):
prefs[knob].setValue(val)