Skip to content

Commit 91df1b8

Browse files
committed
- fix add_edge failure to connect two connections if another connection exists between the two nodes
(but different inputs/output). - fix connection attr_type not being parsed correctly - add "style" attributes for node & edge widgets - add options for node fonts - fix for core node metadata load (wasn't getting proper path) - add "util.is_newer" to check two file's creation date (for autosave check). - fix autosave bug - scene preferences update the ui preferences on load. - StylesheetManager now parses multiple palette & font styles - API cleanup
1 parent 3048993 commit 91df1b8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2949
-927
lines changed

cfg/default-palette.cfg

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
@menu-separator-color = #6f6f6f
2727

2828
@tab-subtab-bg = #658269
29-
@tab-title-color = #e3e3e3
29+
@tab-title-color-selected = #e3e3e3
30+
@tab-title-color-deselected = #e3e3e3
3031
@tab-top-selected = #6d6d6d
3132
@tab-top-hover = #818181
3233
@tab-top-deselected = #363636
@@ -55,7 +56,8 @@
5556
@group-border-color = #353535
5657
@group-flat-border-color = #444444
5758

58-
@combo-bg-color = #5d5d5d
59+
@combo-bg-color1 = #5d5d5d
60+
@combo-bg-color2 = #5d5d5d
5961
@combo-border-color = #303030
6062
@combo-border-color-left = #515151
6163
@combo-border-left = #515151

cfg/nuke-fonts.cfg

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@font-family-ui:Linux = DejaVu Sans
2+
@font-family-ui:MacOSX = Verdana
3+
@font-family-ui:Windows = Lucida Sans Unicode
4+
@font-family-mono:Linux = DejaVu Sans Mono
5+
@font-family-mono:MacOSX = Menlo
6+
@font-family-mono:Windows = Lucida Console
7+
@font-family-nodes:Linux = DejaVu Sans
8+
@font-family-nodes:MacOSX = Menlo
9+
@font-family-nodes:Windows = Lucida Console
10+
@font-size-ui:Linux = 8pt
11+
@font-size-ui:MacOSX = 12pt
12+
@font-size-ui:Windows = 8pt
13+
@font-size-mono:Linux = 10pt
14+
@font-size-mono:MacOSX = 14pt
15+
@font-size-mono:Windows = 9pt
16+
@font-size-ui:header:Linux = 0
17+
@font-size-ui:header:MacOSX = 0
18+
@font-size-ui:header:Windows = 0
19+
@font-size-mono:status:Linux = -2
20+
@font-size-mono:status:MacOSX = -2
21+
@font-size-mono:status:Windows = -1
22+
@font-size-mono:console:Linux = -1
23+
@font-size-mono:console:MacOSX = -2
24+
@font-size-mono:console:Windows = -1

cfg/nuke-palette.cfg

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
@background-color = #323232
2+
@background-color-darker = #313131
3+
4+
@widget-color = #d7d7d7
5+
@widget-color-hover = #ffa02f
6+
@widget-color-selected = #eeeeee
7+
8+
@widget-bg-color = #2b2b2b
9+
@widget-bg-hover = #ffa02f
10+
@widget-bg-selected = #ffa02f
11+
12+
@mid-color = #646464
13+
@mid-darker = #5A5A5A
14+
@mid-darkest = #404040
15+
16+
@border-groove = #1C1C1C
17+
@border-dark = #292929
18+
@border-swatch = #2a2a2a
19+
20+
@status-border = #383838
21+
@status-color = #c4c4c4
22+
@status-bg-color = #323232
23+
24+
@menu-bg-color = #525252
25+
@menu-border-color = #424242
26+
@menu-separator-color = #6f6f6f
27+
28+
@tab-subtab-bg = #313131
29+
@tab-title-color-selected = #ffa02f
30+
@tab-title-color-deselected = #d1d1d1
31+
@tab-top-selected = #323232
32+
@tab-top-hover = #353535
33+
@tab-top-deselected = #262626
34+
@tab-border-color = #171717
35+
36+
@header-bg-color = #2b2b2b
37+
@header-border = #4a4a4a
38+
39+
@button-bg-med = #5e5e5e
40+
@button-bg-color = #5d5d5d
41+
@button-bg-selected = #6e6e6e
42+
@button-bg-hover = #707070
43+
@button-bg-disabled = #515151
44+
@button-color-disabled = #7b7b7b
45+
46+
@button-border-light = #7c7c7c
47+
@button-border-mid = #454545
48+
@button-border = #626262
49+
@button-border-selected = #696969
50+
@button-border-hover = #767676
51+
@output-bg-color = #222222
52+
53+
54+
@dock-title-bg-color = #5d5d5d
55+
@dock-title-border-color = #404040
56+
57+
@group-border-color = #353535
58+
@group-flat-border-color = #323232
59+
60+
@combo-bg-color1 = #5d5d5d
61+
@combo-bg-color2 = #5d5d5d
62+
@combo-border-color = #303030
63+
@combo-border-color-left = #515151
64+
@combo-border-left = #515151
65+
@combo-dropdown-bg-color = #5d5d5d
66+
@combo-dropdown-bg-border = #4f4f4f
67+
68+
@view-border-dark = #303030
69+
70+
@line-border-light = #373737
71+
@line-bg-dark = #2b2b2b
72+
@line-bg-dark-disabled = #404040
73+
@line-bg-connected = #f1f1a5
74+
@line-color-connected = #000000

core/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@
1212
EventHandler = events.EventHandler
1313

1414

15-
from . import manager
1615
from . import metadata
17-
18-
1916
# Parsers/Managers
20-
NodeManager = manager.NodeManager
2117
MetadataParser = metadata.MetadataParser
2218

2319

core/attributes.py

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,25 @@ def update(self, **kwargs):
5858
"""
5959
Update attributes.
6060
61-
* todo: can't pass as **kwargs else we lose the order (why is that?)
61+
.. todo::
62+
- can't pass as **kwargs else we lose the order (why is that?)
6263
"""
6364
for name, value in kwargs.iteritems():
64-
# we don't save edge attributes, so don't read them from disk.
65-
if name not in ['_edges']:
66-
#print '# adding attribute: "%s"' % name
67-
if hasattr(self, name) and value != getattr(self, name):
68-
print '# DEBUG: Attribute "%s" updating value: "%s": "%s" - "%s"' % (self.name, name, value, getattr(self, name))
69-
setattr(self, name, value)
65+
if value not in [None, 'null']:
66+
# we don't save edge attributes, so don't read them from disk.
67+
if name not in ['_edges']:
68+
#print '# adding attribute: "%s"' % name
69+
if hasattr(self, name) and value != getattr(self, name):
70+
print '# DEBUG: Attribute "%s" updating value: "%s": "%s" - "%s"' % (self.name, name, value, getattr(self, name))
71+
setattr(self, name, value)
7072

7173
@property
7274
def data(self):
7375
"""
7476
Output data for writing.
77+
78+
:returns: attribute data.
79+
:rtype: dict
7580
"""
7681
data = dict()
7782
#for attr in self.REQUIRED:
@@ -86,6 +91,10 @@ def data(self):
8691

8792
@property
8893
def dagnode(self):
94+
"""
95+
:returns: dag node parent.
96+
:rtype: DagNode
97+
"""
8998
return self._dag()
9099

91100
@property
@@ -100,19 +109,29 @@ def attr_type(self, val):
100109

101110
@property
102111
def is_input(self):
112+
"""
113+
:returns: attribute is an input connection.
114+
:rtype: bool
115+
"""
103116
if not self.connectable:
104117
return False
105118
return self.connection_type == 'input'
106119

107120
@property
108121
def is_output(self):
122+
"""
123+
:returns: attribute is an output connection.
124+
:rtype: bool
125+
"""
109126
if not self.connectable:
110127
return False
111128
return self.connection_type == 'output'
112129

113130
def rename(self, name):
114131
"""
115132
Rename the attribute.
133+
134+
:param str name: new name.
116135
"""
117136
old_name = self.name
118137
self.name = name

core/events.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ def __iadd__(self, callback):
2727
def __isub__(self, callback):
2828
"""
2929
Remove a callback to the stack.
30+
31+
:param callable callback: callback function/method.
3032
"""
3133
self.remove(callback)
3234
return self
@@ -45,7 +47,7 @@ def __delitem__(self, index):
4547

4648
def blockSignals(self, block):
4749
"""
48-
Block signals to the event.
50+
Temporarily block the handler from signalling its observers.
4951
5052
:param bool block: block signals.
5153
"""

0 commit comments

Comments
 (0)