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 1/2] [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 f361561235..8052edba62 100644 --- a/meshroom/nodes/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/nodes/aliceVision/PanoramaPostProcessing.py @@ -83,6 +83,24 @@ class PanoramaPostProcessing(desc.CommandLineNode): 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 @@ class PanoramaPostProcessing(desc.CommandLineNode): 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 @@ class PanoramaPostProcessing(desc.CommandLineNode): 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='', ), From ceba9c52154aa20ca42c4bbe0d4caf360b0b16e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Tue, 19 Sep 2023 15:58:40 +0200 Subject: [PATCH 2/2] [pipelines] Panorama: Update the `PanoramaPostProcessing` node's version --- meshroom/pipelines/panoramaFisheyeHdr.mg | 2 +- meshroom/pipelines/panoramaHdr.mg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/pipelines/panoramaFisheyeHdr.mg b/meshroom/pipelines/panoramaFisheyeHdr.mg index 4556de3d66..797976ad7a 100644 --- a/meshroom/pipelines/panoramaFisheyeHdr.mg +++ b/meshroom/pipelines/panoramaFisheyeHdr.mg @@ -11,7 +11,7 @@ "PanoramaPrepareImages": "1.1", "PanoramaInit": "2.0", "Publish": "1.3", - "PanoramaPostProcessing": "2.0", + "PanoramaPostProcessing": "2.1", "FeatureMatching": "2.0", "LdrToHdrSampling": "4.0", "PanoramaWarping": "1.1", diff --git a/meshroom/pipelines/panoramaHdr.mg b/meshroom/pipelines/panoramaHdr.mg index a7ee3247dc..a96bb8e000 100644 --- a/meshroom/pipelines/panoramaHdr.mg +++ b/meshroom/pipelines/panoramaHdr.mg @@ -11,7 +11,7 @@ "PanoramaPrepareImages": "1.1", "PanoramaInit": "2.0", "Publish": "1.3", - "PanoramaPostProcessing": "2.0", + "PanoramaPostProcessing": "2.1", "FeatureMatching": "2.0", "LdrToHdrSampling": "4.0", "PanoramaWarping": "1.1",