mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 16:58:24 +02:00
Add "Notes" tab with "comment"/"invalid comment" attributes
Add two internal attributes, "Comment" and "Invalid comment", in a specific "Notes" tab, which will contain any further internal attribute. Internal attributes exist for all nodes.
This commit is contained in:
parent
1fc2b228af
commit
9bc9e2c129
6 changed files with 146 additions and 3 deletions
|
@ -687,9 +687,24 @@ class Graph(BaseObject):
|
|||
# type: (str) -> Attribute
|
||||
"""
|
||||
Return the attribute identified by the unique name 'fullName'.
|
||||
If it does not exist, return None.
|
||||
"""
|
||||
node, attribute = fullName.split('.', 1)
|
||||
return self.node(node).attribute(attribute)
|
||||
if self.node(node).hasAttribute(attribute):
|
||||
return self.node(node).attribute(attribute)
|
||||
return None
|
||||
|
||||
@Slot(str, result=Attribute)
|
||||
def internalAttribute(self, fullName):
|
||||
# type: (str) -> Attribute
|
||||
"""
|
||||
Return the internal attribute identified by the unique name 'fullName'.
|
||||
If it does not exist, return None.
|
||||
"""
|
||||
node, attribute = fullName.split('.', 1)
|
||||
if self.node(node).hasInternalAttribute(attribute):
|
||||
return self.node(node).internalAttribute(attribute)
|
||||
return None
|
||||
|
||||
@staticmethod
|
||||
def getNodeIndexFromName(name):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue