mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-19 01:27:31 +02:00
[core] Add reference to attribute's instance type in descriptions
This commit is contained in:
parent
eb60ad0389
commit
17e8e3e315
2 changed files with 33 additions and 11 deletions
|
@ -25,17 +25,7 @@ def attributeFactory(description, value, isOutput, node, root=None, parent=None)
|
|||
root: (optional) parent Attribute (must be ListAttribute or GroupAttribute)
|
||||
parent (BaseObject): (optional) the parent BaseObject if any
|
||||
"""
|
||||
if isinstance(description, desc.GroupAttribute):
|
||||
cls = GroupAttribute
|
||||
elif isinstance(description, desc.ListAttribute):
|
||||
cls = ListAttribute
|
||||
elif isinstance(description, desc.ChoiceParam):
|
||||
cls = ChoiceParam
|
||||
elif isinstance(description, desc.PushButtonParam):
|
||||
cls = PushButtonParam
|
||||
else:
|
||||
cls = Attribute
|
||||
attr = cls(node, description, isOutput, root, parent)
|
||||
attr = description.instanceType(node, description, isOutput, root, parent)
|
||||
if value is not None:
|
||||
attr._set_value(value, emitSignals=False)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue