From 379e674967e5d8acda4a78b36140e3f32a4ba968 Mon Sep 17 00:00:00 2001 From: Fabien Castan Date: Thu, 13 Jun 2024 23:57:18 +0200 Subject: [PATCH] [core] node: set the attribute value from the constructor --- meshroom/core/node.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/meshroom/core/node.py b/meshroom/core/node.py index 0aa7b3f2..b56db41b 100644 --- a/meshroom/core/node.py +++ b/meshroom/core/node.py @@ -1272,13 +1272,13 @@ class Node(BaseNode): self._internalFolder = self.nodeDesc.internalFolder for attrDesc in self.nodeDesc.inputs: - self._attributes.add(attributeFactory(attrDesc, None, False, self)) + self._attributes.add(attributeFactory(attrDesc, kwargs.get(attrDesc.name, None), isOutput=False, node=self)) for attrDesc in self.nodeDesc.outputs: - self._attributes.add(attributeFactory(attrDesc, None, True, self)) + self._attributes.add(attributeFactory(attrDesc, kwargs.get(attrDesc.name, None), isOutput=True, node=self)) for attrDesc in self.nodeDesc.internalInputs: - self._internalAttributes.add(attributeFactory(attrDesc, None, False, self)) + self._internalAttributes.add(attributeFactory(attrDesc, kwargs.get(attrDesc.name, None), isOutput=False, node=self)) # List attributes per uid for attr in self._attributes: @@ -1292,8 +1292,6 @@ class Node(BaseNode): for uidIndex in attr.attributeDesc.uid: self.attributesPerUid[uidIndex].add(attr) - self.setAttributeValues(kwargs) - self.setInternalAttributeValues(kwargs) self.optionalCallOnDescriptor("onNodeCreated") def optionalCallOnDescriptor(self, methodName, *args, **kwargs):