mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-20 01:57:16 +02:00
Merge remote-tracking branch 'origin/develop' into dev/nodesAndTaskManager
This commit is contained in:
commit
79e1c69d5d
39 changed files with 2060 additions and 209 deletions
|
@ -269,6 +269,7 @@ class Attribute(BaseObject):
|
|||
hasOutputConnections = Property(bool, hasOutputConnections.fget, notify=hasOutputConnectionsChanged)
|
||||
isDefault = Property(bool, _isDefault, notify=valueChanged)
|
||||
linkParam = Property(BaseObject, getLinkParam, notify=isLinkChanged)
|
||||
rootLinkParam = Property(BaseObject, lambda self: self.getLinkParam(recursive=True), notify=isLinkChanged)
|
||||
node = Property(BaseObject, node.fget, constant=True)
|
||||
enabledChanged = Signal()
|
||||
enabled = Property(bool, getEnabled, setEnabled, notify=enabledChanged)
|
||||
|
@ -312,8 +313,8 @@ class ListAttribute(Attribute):
|
|||
self._value = value
|
||||
# New value
|
||||
else:
|
||||
self.desc.validateValue(value)
|
||||
self.extend(value)
|
||||
newValue = self.desc.validateValue(value)
|
||||
self.extend(newValue)
|
||||
self.requestGraphUpdate()
|
||||
|
||||
@raiseIfLink
|
||||
|
@ -422,10 +423,16 @@ class GroupAttribute(Attribute):
|
|||
raise AttributeError(key)
|
||||
|
||||
def _set_value(self, exportedValue):
|
||||
self.desc.validateValue(exportedValue)
|
||||
# set individual child attribute values
|
||||
for key, value in exportedValue.items():
|
||||
self._value.get(key).value = value
|
||||
value = self.desc.validateValue(exportedValue)
|
||||
if isinstance(value, dict):
|
||||
# set individual child attribute values
|
||||
for key, v in value.items():
|
||||
self._value.get(key).value = v
|
||||
elif isinstance(value, (list, tuple)):
|
||||
for attrDesc, v in zip(self.desc._groupDesc, value):
|
||||
self._value.get(attrDesc.name).value = v
|
||||
else:
|
||||
raise AttributeError("Failed to set on GroupAttribute: {}".format(str(value)))
|
||||
|
||||
@Slot(str, result=Attribute)
|
||||
def childAttribute(self, key):
|
||||
|
@ -446,7 +453,7 @@ class GroupAttribute(Attribute):
|
|||
def uid(self, uidIndex):
|
||||
uids = []
|
||||
for k, v in self._value.items():
|
||||
if uidIndex in v.desc.uid:
|
||||
if v.enabled and uidIndex in v.desc.uid:
|
||||
uids.append(v.uid(uidIndex))
|
||||
return hashValue(uids)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue