From 3aad1ccbc32998c7ba7b2e30ad4f08c353bc4be0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Tue, 19 Sep 2023 15:57:28 +0200 Subject: [PATCH] [nodes] PanoramaPostProcessing: Add attributes to change the outputs' names Add input String parameters to determine the name of the generated outputs. These attributes include: - the name of the generated output panorama - the name of the generated output panorama preview The base folder for these outputs remains the node's cache, only the name of the outputs themselves can be updated. The output attribute about the downscaled levels of the panorama is also modified with the new name of the pyramid levels, which is a concatenation of the generated panorama's name and the size of the current level. --- .../aliceVision/PanoramaPostProcessing.py | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/meshroom/nodes/aliceVision/PanoramaPostProcessing.py b/meshroom/nodes/aliceVision/PanoramaPostProcessing.py index f3615612..8052edba 100644 --- a/meshroom/nodes/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/nodes/aliceVision/PanoramaPostProcessing.py @@ -83,6 +83,24 @@ Post process the panorama. uid=[0], enabled=lambda node: node.compressionMethod.value in ["dwaa", "dwab", "zip", "zips"] ), + desc.StringParam( + name="panoramaName", + label="Output Panorama Name", + description="Name of the output panorama.", + value="panorama.exr", + uid=[], + group=None, + advanced=True + ), + desc.StringParam( + name="previewName", + label="Panorama Preview Name", + description="Name of the preview of the output panorama.", + value="panoramaPreview.jpg", + uid=[], + group=None, + advanced=True, + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", @@ -100,7 +118,7 @@ Post process the panorama. label="Output Panorama", description="Generated panorama in EXR format.", semantic="image", - value=desc.Node.internalFolder + "panorama.exr", + value=lambda attr: desc.Node.internalFolder + attr.node.panoramaName.value, uid=[], ), desc.File( @@ -108,14 +126,14 @@ Post process the panorama. label="Output Panorama Preview", description="Preview of the generated panorama in JPG format.", semantic="image", - value=desc.Node.internalFolder + "panoramaPreview.jpg", + value=lambda attr: desc.Node.internalFolder + attr.node.previewName.value, uid=[], ), desc.File( name="downscaledPanoramaLevels", label="Downscaled Panorama Levels", description="Downscaled versions of the generated panorama.", - value=desc.Node.internalFolder + "level_*.exr", + value=lambda attr: desc.Node.internalFolder + os.path.splitext(attr.node.panoramaName.value)[0] + "_level_*.exr", uid=[], group='', ),