mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 16:58:24 +02:00
[desc] Introducing ListAttribute and GroupAttribute
This commit is contained in:
parent
2a213b70cf
commit
d22c2f7f8e
1 changed files with 21 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
from meshroom.common import BaseObject, Property, Variant, Signal
|
||||
from meshroom.common import BaseObject, Property, Variant
|
||||
|
||||
|
||||
class Attribute(BaseObject):
|
||||
|
@ -22,6 +22,26 @@ class Attribute(BaseObject):
|
|||
isOutput = Property(bool, lambda self: self._isOutput, constant=True)
|
||||
|
||||
|
||||
class ListAttribute(Attribute):
|
||||
""" A list of Attributes """
|
||||
def __init__(self, elementDesc, label, description, group='allParams'):
|
||||
"""
|
||||
:param elementDesc: the Attribute description of elements to store in that list
|
||||
"""
|
||||
self.elementDesc = elementDesc
|
||||
super(ListAttribute, self).__init__(label=label, description=description, value=None, uid=(), group=group)
|
||||
|
||||
|
||||
class GroupAttribute(Attribute):
|
||||
""" A macro Attribute composed of several Attributes """
|
||||
def __init__(self, groupDesc, label, description, group='allParams'):
|
||||
"""
|
||||
:param groupDesc: the description of the Attributes composing this group
|
||||
"""
|
||||
self.groupDesc = groupDesc
|
||||
super(GroupAttribute, self).__init__(label=label, description=description, value=None, uid=(), group=group)
|
||||
|
||||
|
||||
class Param(Attribute):
|
||||
"""
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue