Merge pull request #2428 from alicevision/fix/outputExportAnimatedCamera

[nodes] Fix outputImages if no export in ExportAnimatedCamera
This commit is contained in:
Fabien Castan 2024-06-07 19:13:23 +02:00 committed by GitHub
commit 601fbc53f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 15 deletions

View file

@ -750,6 +750,8 @@ class BaseNode(BaseObject):
# Apply expressions for File attributes
if attr.attributeDesc.isExpression:
defaultValue = ""
# Do not evaluate expression for disabled attributes (the expression may refer to other attributes that are not defined)
if attr.enabled:
try:
defaultValue = attr.defaultValue()
except AttributeError as e:

View file

@ -120,6 +120,7 @@ Based on the input image filenames, it will recognize the input video sequence t
value=desc.Node.internalFolder + "undistort/" + "<INTRINSIC_ID>_<FILESTEM>.{undistortedImageTypeValue}",
semantic="image",
group="", # exclude from command line
enabled=lambda node: node.exportUndistortedImages.value,
uid=[],
),
]

View file

@ -81,7 +81,7 @@ def test_multiviewPipeline():
for node in graph1.nodes:
otherNode = otherGraph.node(node.name)
for key, attr in node.attributes.items():
if attr.isOutput:
if attr.isOutput and attr.enabled:
otherAttr = otherNode.attribute(key)
assert attr.uid() != otherAttr.uid()
@ -91,7 +91,7 @@ def test_multiviewPipeline():
otherNode = graph2b.node(node.name)
for key, attr in node.attributes.items():
otherAttr = otherNode.attribute(key)
if attr.isOutput:
if attr.isOutput and attr.enabled:
assert attr.uid() == otherAttr.uid()
else:
for uidIndex in attr.desc.uid:
@ -103,7 +103,7 @@ def test_multiviewPipeline():
otherNode = graph4b.node(node.name)
for key, attr in node.attributes.items():
otherAttr = otherNode.attribute(key)
if attr.isOutput:
if attr.isOutput and attr.enabled:
assert attr.uid() == otherAttr.uid()
else:
for uidIndex in attr.desc.uid: