mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-29 17:06:35 +02:00
Add "label" as an internal attribute
Setting the "label" internal attribute allows to give a custom label to replace the node's default label.
This commit is contained in:
parent
9bc9e2c129
commit
330382ab0c
4 changed files with 31 additions and 1 deletions
|
@ -168,6 +168,10 @@ class Attribute(BaseObject):
|
|||
# TODO: only update the graph if this attribute participates to a UID
|
||||
if self.isInput:
|
||||
self.requestGraphUpdate()
|
||||
# TODO: only call update of the node if the attribute is internal
|
||||
# Internal attributes are set as inputs
|
||||
self.requestNodeUpdate()
|
||||
|
||||
self.valueChanged.emit()
|
||||
|
||||
def upgradeValue(self, exportedValue):
|
||||
|
@ -181,6 +185,12 @@ class Attribute(BaseObject):
|
|||
self.node.graph.markNodesDirty(self.node)
|
||||
self.node.graph.update()
|
||||
|
||||
def requestNodeUpdate(self):
|
||||
# Update specific node information that do not affect the rest of the graph
|
||||
# (like internal attributes)
|
||||
if self.node:
|
||||
self.node.updateInternalAttributes()
|
||||
|
||||
@property
|
||||
def isOutput(self):
|
||||
return self._isOutput
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue