Skip to content

Commit

Permalink
[nodes] Replace desc.Node.internalFolder with ${NODE_CACHE_FOLDER}
Browse files Browse the repository at this point in the history
For all nodes, use the new syntax for relative paths.
  • Loading branch information
cbentejac committed Dec 27, 2024
1 parent 65a9c3f commit 4ebce67
Show file tree
Hide file tree
Showing 84 changed files with 148 additions and 148 deletions.
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/ApplyCalibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ class ApplyCalibration(desc.AVCommandLineNode):
name="output",
label="SMData",
description="Path to the output SfMData file.",
value=desc.Node.internalFolder + "sfmData.sfm",
value="${NODE_CACHE_FOLDER}" + "sfmData.sfm",
),
]
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/CameraCalibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,6 @@ class CameraCalibration(desc.AVCommandLineNode):
name="output",
label="Output",
description="Output filename for intrinsic [and extrinsic] parameters.",
value=desc.Node.internalFolder + "/cameraCalibration.cal",
value="${NODE_CACHE_FOLDER}" + "cameraCalibration.cal",
),
]
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/CameraInit.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode):
name="output",
label="SfMData",
description="Output SfMData.",
value=desc.Node.internalFolder + "cameraInit.sfm",
value="${NODE_CACHE_FOLDER}" + "cameraInit.sfm",
),
]

Expand Down
4 changes: 2 additions & 2 deletions meshroom/nodes/aliceVision/CameraLocalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,12 @@ class CameraLocalization(desc.AVCommandLineNode):
name="outputAlembic",
label="Alembic",
description="Filename for the SfMData export file (where camera poses will be stored).",
value=desc.Node.internalFolder + "trackedCameras.abc",
value="${NODE_CACHE_FOLDER}" + "trackedCameras.abc",
),
desc.File(
name="outputJSON",
label="JSON File",
description="Filename for the localization results as .json.",
value=desc.Node.internalFolder + "trackedCameras.json",
value="${NODE_CACHE_FOLDER}" + "trackedCameras.json",
),
]
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/CameraRigCalibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,6 @@ class CameraRigCalibration(desc.AVCommandLineNode):
name="outfile",
label="Output File",
description="The name of the file to store the calibration data in.",
value=desc.Node.internalFolder + "cameraRigCalibration.rigCal",
value="${NODE_CACHE_FOLDER}" + "cameraRigCalibration.rigCal",
),
]
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/CameraRigLocalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,6 @@ class CameraRigLocalization(desc.AVCommandLineNode):
name="outputAlembic",
label="Alembic",
description="Filename for the SfMData export file (where camera poses will be stored).",
value=desc.Node.internalFolder + "trackedcameras.abc",
value="${NODE_CACHE_FOLDER}" + "trackedcameras.abc",
),
]
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/CheckerboardCalibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ class CheckerboardCalibration(desc.AVCommandLineNode):
name="output",
label="SfMData File",
description="Path to the output SfMData file.",
value=desc.Node.internalFolder + "sfmData.sfm",
value="${NODE_CACHE_FOLDER}" + "sfmData.sfm",
)
]
4 changes: 2 additions & 2 deletions meshroom/nodes/aliceVision/CheckerboardDetection.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ class CheckerboardDetection(desc.AVCommandLineNode):
name="output",
label="Folder",
description="Output folder.",
value=desc.Node.internalFolder,
value="${NODE_CACHE_FOLDER}",
),
desc.File(
name="checkerLines",
enabled=lambda node: node.exportDebugImages.value,
label="Checker Lines",
description="Debug images.",
semantic="image",
value=desc.Node.internalFolder + "<VIEW_ID>.png",
value="${NODE_CACHE_FOLDER}" + "<VIEW_ID>.png",
group="", # do not export on the command line
),
]
4 changes: 2 additions & 2 deletions meshroom/nodes/aliceVision/ColorCheckerCorrection.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ class ColorCheckerCorrection(desc.AVCommandLineNode):
name="outSfMData",
label="SfMData",
description="Output SfMData.",
value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in [".abc", ".sfm"]) else "",
value=lambda attr: ("${NODE_CACHE_FOLDER}" + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in [".abc", ".sfm"]) else "",
group="", # do not export on the command line
),
desc.File(
name="output",
label="Folder",
description="Output images folder.",
value=desc.Node.internalFolder,
value="${NODE_CACHE_FOLDER}",
),
]
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/ColorCheckerDetection.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ class ColorCheckerDetection(desc.AVCommandLineNode):
name="outputData",
label="Color Checker Data",
description="Output position and colorimetric data extracted from detected color checkers in the images.",
value=desc.Node.internalFolder + "/ccheckers.json",
value="${NODE_CACHE_FOLDER}" + "ccheckers.json",
),
]
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/ConvertDistortion.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ class ConvertDistortion(desc.AVCommandLineNode):
name="output",
label="Output",
description="Path to the output SfMData file.",
value=desc.Node.internalFolder + "sfm.abc",
value="${NODE_CACHE_FOLDER}" + "sfm.abc",
),
]
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/ConvertMesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ class ConvertMesh(desc.AVCommandLineNode):
name="output",
label="Mesh",
description="Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).",
value=desc.Node.internalFolder + "mesh." + "{outputMeshFileTypeValue}",
value="${NODE_CACHE_FOLDER}" + "mesh." + "{outputMeshFileTypeValue}",
),
]
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/ConvertSfMFormat.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,6 @@ class ConvertSfMFormat(desc.AVCommandLineNode):
name="output",
label="Output",
description="Path to the output SfMData file.",
value=desc.Node.internalFolder + "sfm.{fileExtValue}",
value="${NODE_CACHE_FOLDER}" + "sfm.{fileExtValue}",
),
]
14 changes: 7 additions & 7 deletions meshroom/nodes/aliceVision/DepthMap.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ class DepthMap(desc.AVCommandLineNode):
name="output",
label="Folder",
description="Output folder for generated depth maps.",
value=desc.Node.internalFolder,
value="${NODE_CACHE_FOLDER}",
),
# these attributes are only here to describe more accurately the output of the node
# by specifying that it generates 2 sequences of images
Expand All @@ -575,22 +575,22 @@ class DepthMap(desc.AVCommandLineNode):
label="Depth Maps",
description="Generated depth maps.",
semantic="image",
value=desc.Node.internalFolder + "<VIEW_ID>_depthMap.exr",
value="${NODE_CACHE_FOLDER}" + "<VIEW_ID>_depthMap.exr",
group="", # do not export on the command line
),
desc.File(
name="sim",
label="Sim Maps",
description="Generated sim maps.",
semantic="image",
value=desc.Node.internalFolder + "<VIEW_ID>_simMap.exr",
value="${NODE_CACHE_FOLDER}" + "<VIEW_ID>_simMap.exr",
group="", # do not export on the command line
),
desc.File(
name="tilePattern",
label="Tile Pattern",
description="Debug: Tile pattern.",
value=desc.Node.internalFolder + "<VIEW_ID>_tilePattern.obj",
value="${NODE_CACHE_FOLDER}" + "<VIEW_ID>_tilePattern.obj",
group="", # do not export on the command line
enabled=lambda node: node.intermediateResults.exportTilePattern.value,
),
Expand All @@ -599,7 +599,7 @@ class DepthMap(desc.AVCommandLineNode):
label="Depth Maps SGM",
description="Debug: Depth maps SGM",
semantic="image",
value=desc.Node.internalFolder + "<VIEW_ID>_depthMap_sgm.exr",
value="${NODE_CACHE_FOLDER}" + "<VIEW_ID>_depthMap_sgm.exr",
group="", # do not export on the command line
enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value,
),
Expand All @@ -608,7 +608,7 @@ class DepthMap(desc.AVCommandLineNode):
label="Depth Maps SGM Upscaled",
description="Debug: Depth maps SGM upscaled.",
semantic="image",
value=desc.Node.internalFolder + "<VIEW_ID>_depthMap_sgmUpscaled.exr",
value="${NODE_CACHE_FOLDER}" + "<VIEW_ID>_depthMap_sgmUpscaled.exr",
group="", # do not export on the command line
enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value,
),
Expand All @@ -617,7 +617,7 @@ class DepthMap(desc.AVCommandLineNode):
label="Depth Maps Refined",
description="Debug: Depth maps after refinement",
semantic="image",
value=desc.Node.internalFolder + "<VIEW_ID>_depthMap_refinedFused.exr",
value="${NODE_CACHE_FOLDER}" + "<VIEW_ID>_depthMap_refinedFused.exr",
group="", # do not export on the command line
enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value,
),
Expand Down
8 changes: 4 additions & 4 deletions meshroom/nodes/aliceVision/DepthMapFilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class DepthMapFilter(desc.AVCommandLineNode):
name="output",
label="Filtered Depth Maps Folder",
description="Output folder for generated depth maps.",
value=desc.Node.internalFolder,
value="${NODE_CACHE_FOLDER}",
),
# these attributes are only here to describe more accurately the output of the node
# by specifying that it generates 2 sequences of images
Expand All @@ -123,23 +123,23 @@ class DepthMapFilter(desc.AVCommandLineNode):
label="Depth Maps",
description="Filtered depth maps.",
semantic="image",
value=desc.Node.internalFolder + "<VIEW_ID>_depthMap.exr",
value="${NODE_CACHE_FOLDER}" + "<VIEW_ID>_depthMap.exr",
group="", # do not export on the command line
),
desc.File(
name="sim",
label="Sim Maps",
description="Filtered sim maps.",
semantic="image",
value=desc.Node.internalFolder + "<VIEW_ID>_simMap.exr",
value="${NODE_CACHE_FOLDER}" + "<VIEW_ID>_simMap.exr",
group="", # do not export on the command line
),
desc.File(
name="normal",
label="Normal Maps",
description="Normal maps.",
semantic="image",
value=desc.Node.internalFolder + "<VIEW_ID>_normalMap.exr",
value="${NODE_CACHE_FOLDER}" + "<VIEW_ID>_normalMap.exr",
enabled=lambda node: node.computeNormalMaps.value,
group="", # do not export on the command line
),
Expand Down
6 changes: 3 additions & 3 deletions meshroom/nodes/aliceVision/DepthMapRendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,22 @@ class DepthMapRendering(desc.AVCommandLineNode):
name="output",
label="Folder",
description="Output folder.",
value=desc.Node.internalFolder,
value="${NODE_CACHE_FOLDER}",
),
desc.File(
name="depth",
label="Depth Maps",
description="Rendered depth maps.",
semantic="image",
value=desc.Node.internalFolder + "<VIEW_ID>_depthMap.exr",
value="${NODE_CACHE_FOLDER}" + "<VIEW_ID>_depthMap.exr",
group="", # do not export on the command line
),
desc.File(
name="mask",
label="Masks",
description="Masks.",
semantic="image",
value=desc.Node.internalFolder + "<VIEW_ID>_mask.exr",
value="${NODE_CACHE_FOLDER}" + "<VIEW_ID>_mask.exr",
group="", # do not export on the command line
),
]
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/DistortionCalibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ class DistortionCalibration(desc.AVCommandLineNode):
name="output",
label="SfMData File",
description="Path to the output SfMData file.",
value=desc.Node.internalFolder + "sfmData.sfm",
value="${NODE_CACHE_FOLDER}" + "sfmData.sfm",
),
]
8 changes: 4 additions & 4 deletions meshroom/nodes/aliceVision/ExportAnimatedCamera.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,27 +83,27 @@ class ExportAnimatedCamera(desc.AVCommandLineNode):
name="output",
label="Folder",
description="Output folder with animated camera and undistorted images.",
value=desc.Node.internalFolder,
value="${NODE_CACHE_FOLDER}",
),
desc.File(
name="outputCamera",
label="Camera",
description="Output filename for the animated camera in Alembic format.",
value=desc.Node.internalFolder + "camera.abc",
value="${NODE_CACHE_FOLDER}" + "camera.abc",
group="", # exclude from command line
),
desc.File(
name="outputUndistorted",
label="Undistorted Folder",
description="Output undistorted folder.",
value=desc.Node.internalFolder + "undistort/",
value="${NODE_CACHE_FOLDER}" + "undistort/",
group="", # exclude from command line
),
desc.File(
name="outputImages",
label="Undistorted Images",
description="Output undistorted images.",
value=desc.Node.internalFolder + "undistort/" + "<INTRINSIC_ID>_<FILESTEM>.{undistortedImageTypeValue}",
value="${NODE_CACHE_FOLDER}" + "undistort/" + "<INTRINSIC_ID>_<FILESTEM>.{undistortedImageTypeValue}",
semantic="image",
group="", # exclude from command line
enabled=lambda node: node.exportUndistortedImages.value,
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/ExportColoredPointCloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ class ExportColoredPointCloud(desc.AVCommandLineNode):
name="output",
label="Point Cloud Filepath",
description="Output point cloud with visibilities as SfMData file.",
value=desc.Node.internalFolder + "pointCloud.abc",
value="${NODE_CACHE_FOLDER}" + "pointCloud.abc",
),
]
10 changes: 5 additions & 5 deletions meshroom/nodes/aliceVision/ExportDistortion.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ class ExportDistortion(desc.AVCommandLineNode):
name="output",
label="Folder",
description="Output folder.",
value=desc.Node.internalFolder,
value="${NODE_CACHE_FOLDER}",
),
desc.File(
name="distortionNukeNode",
label="Distortion Nuke Node",
description="Calibrated distortion ST map.",
value=desc.Node.internalFolder + "nukeLensDistortion_<INTRINSIC_ID>.nk",
value="${NODE_CACHE_FOLDER}" + "nukeLensDistortion_<INTRINSIC_ID>.nk",
group="", # do not export on the command line
enabled=lambda node: node.exportNukeNode.value,
),
Expand All @@ -74,7 +74,7 @@ class ExportDistortion(desc.AVCommandLineNode):
label="Undistorted Lens Grids",
description="Undistorted lens grids for validation",
semantic="image",
value=desc.Node.internalFolder + "lensgrid_<VIEW_ID>_undistort.exr",
value="${NODE_CACHE_FOLDER}" + "lensgrid_<VIEW_ID>_undistort.exr",
group="", # do not export on the command line
enabled=lambda node: node.exportLensGridsUndistorted.value,
),
Expand All @@ -83,7 +83,7 @@ class ExportDistortion(desc.AVCommandLineNode):
label="Distortion ST Map",
description="Calibrated distortion ST map.",
semantic="image",
value=desc.Node.internalFolder + "stmap_<INTRINSIC_ID>_distort.exr",
value="${NODE_CACHE_FOLDER}" + "stmap_<INTRINSIC_ID>_distort.exr",
group="", # do not export on the command line
enabled=lambda node: node.exportSTMaps.value,
),
Expand All @@ -92,7 +92,7 @@ class ExportDistortion(desc.AVCommandLineNode):
label="Undistortion ST Map",
description="Calibrated undistortion ST map.",
semantic="image",
value=desc.Node.internalFolder + "stmap_<INTRINSIC_ID>_undistort.exr",
value="${NODE_CACHE_FOLDER}" + "stmap_<INTRINSIC_ID>_undistort.exr",
group="", # do not export on the command line
enabled=lambda node: node.exportSTMaps.value,
),
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/ExportMatches.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ class ExportMatches(desc.AVCommandLineNode):
name="output",
label="Folder",
description="Output path for the features and descriptors files (*.feat, *.desc).",
value=desc.Node.internalFolder,
value="${NODE_CACHE_FOLDER}",
),
]
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/ExportMaya.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ class ExportMaya(desc.AVCommandLineNode):
name="output",
label="Folder",
description="Folder for MeshroomMaya outputs: undistorted images and thumbnails.",
value=desc.Node.internalFolder,
value="${NODE_CACHE_FOLDER}",
),
]
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/FeatureExtraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,6 @@ class FeatureExtraction(desc.AVCommandLineNode):
name="output",
label="Features Folder",
description="Output path for the features and descriptors files (*.feat, *.desc).",
value=desc.Node.internalFolder,
value="${NODE_CACHE_FOLDER}",
),
]
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/FeatureMatching.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,6 @@ class FeatureMatching(desc.AVCommandLineNode):
name="output",
label="Matches Folder",
description="Path to a folder in which the computed matches are stored.",
value=desc.Node.internalFolder,
value="${NODE_CACHE_FOLDER}",
),
]
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/FeatureRepeatability.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ class FeatureRepeatability(desc.AVCommandLineNode):
name="output",
label="Folder",
description="Output path for the features and descriptors files (*.feat, *.desc).",
value=desc.Node.internalFolder,
value="${NODE_CACHE_FOLDER}",
),
]
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/GlobalRotationEstimating.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ class GlobalRotationEstimating(desc.AVCommandLineNode):
name="output",
label="SfMData",
description="Path to the output SfMData file.",
value=desc.Node.internalFolder + "sfm.abc",
value="${NODE_CACHE_FOLDER}" + "sfm.abc",
),
]
Loading

0 comments on commit 4ebce67

Please sign in to comment.