mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-29 18:27:23 +02:00
[core] Coloring a Node: Exposed the Node Color to be set externally
This commit is contained in:
parent
b5dda4efd0
commit
58a9b74a72
1 changed files with 13 additions and 4 deletions
|
@ -556,6 +556,15 @@ class BaseNode(BaseObject):
|
|||
return self.internalAttribute("color").value.strip()
|
||||
return ""
|
||||
|
||||
def setColor(self, color: str):
|
||||
""" Sets the color of the Node.
|
||||
|
||||
Args:
|
||||
color (str): The hex of the color to set on the node.
|
||||
"""
|
||||
if self.hasInternalAttribute("color"):
|
||||
self.internalAttribute("color").value = color
|
||||
|
||||
def getInvalidationMessage(self):
|
||||
"""
|
||||
Returns:
|
||||
|
@ -1386,7 +1395,7 @@ class BaseNode(BaseObject):
|
|||
internalAttributes = Property(BaseObject, getInternalAttributes, constant=True)
|
||||
internalAttributesChanged = Signal()
|
||||
label = Property(str, getLabel, notify=internalAttributesChanged)
|
||||
color = Property(str, getColor, notify=internalAttributesChanged)
|
||||
color = Property(str, getColor, setColor, notify=internalAttributesChanged)
|
||||
invalidation = Property(str, getInvalidationMessage, notify=internalAttributesChanged)
|
||||
comment = Property(str, getComment, notify=internalAttributesChanged)
|
||||
internalFolderChanged = Signal()
|
||||
|
|
Loading…
Add table
Reference in a new issue