From ad5cd6098f70469549567c86f888b123177f708e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Thu, 23 Jan 2025 17:57:15 +0100 Subject: [PATCH] [nodes] Replace `desc.Node.internalFolder` with `{nodeCacheFolder}` --- mrrs/nodes/benchmark/CalibrationComparison.py | 4 ++-- mrrs/nodes/benchmark/CleanMesh.py | 3 +-- mrrs/nodes/benchmark/DepthMapComparison.py | 4 ++-- mrrs/nodes/benchmark/LoadDataset.py | 16 ++++++++-------- mrrs/nodes/benchmark/MeshComparison.py | 6 +++--- mrrs/nodes/colmap/AutomaticReconstructor.py | 4 ++-- .../colmap/Colmap2MeshroomSfmConvertions.py | 2 +- mrrs/nodes/colmap/DelaunayMesher.py | 2 +- mrrs/nodes/colmap/FeatureExtraction.py | 6 +++--- mrrs/nodes/colmap/FeatureMatching.py | 2 +- mrrs/nodes/colmap/ImageUndistorder.py | 2 +- mrrs/nodes/colmap/ImportColmapDepthMaps.py | 4 ++-- mrrs/nodes/colmap/Mapper.py | 8 ++++---- .../colmap/Meshroom2ColmapSfmConvertions.py | 8 ++++---- mrrs/nodes/colmap/PatchMatchStereo.py | 2 +- mrrs/nodes/colmap/PoissonMesher.py | 2 +- mrrs/nodes/colmap/StereoFusion.py | 4 ++-- mrrs/nodes/depth_map/VizMVSNet.py | 6 +++--- mrrs/nodes/nerf/nerfstudio.py | 2 +- mrrs/nodes/nerf/nerfstudio_export.py | 2 +- mrrs/nodes/reality_capture/ExportXMP.py | 2 +- mrrs/nodes/reality_capture/ImportXMP.py | 2 +- mrrs/nodes/render/CreateTrackingMarkers.py | 6 +++--- mrrs/nodes/render/Render360.py | 4 ++-- mrrs/nodes/render/RenderMesh.py | 4 ++-- mrrs/nodes/render/RenderOverlay.py | 4 ++-- mrrs/nodes/render/SyntheticDataset.py | 6 +++--- mrrs/nodes/stereo_photometry/MS_PS/MS_PS.py | 2 +- .../stereo_photometry/Uni_MS_PS/Uni_MS_PS.py | 2 +- mrrs/nodes/utils/CalibTransform.py | 2 +- mrrs/nodes/utils/ComputeNormals.py | 4 ++-- mrrs/nodes/utils/ConvertImages.py | 4 ++-- mrrs/nodes/utils/CopyData.py | 2 +- mrrs/nodes/utils/CutSfm.py | 2 +- mrrs/nodes/utils/DepthMapTransform.py | 4 ++-- mrrs/nodes/utils/InjectSfmData.py | 6 +++--- mrrs/nodes/utils/MeshTransform.py | 4 ++-- mrrs/nodes/utils/Seq2Video.py | 4 ++-- 38 files changed, 76 insertions(+), 77 deletions(-) diff --git a/mrrs/nodes/benchmark/CalibrationComparison.py b/mrrs/nodes/benchmark/CalibrationComparison.py index e08cf17..8ca1b7a 100644 --- a/mrrs/nodes/benchmark/CalibrationComparison.py +++ b/mrrs/nodes/benchmark/CalibrationComparison.py @@ -63,13 +63,13 @@ class CalibrationComparison(desc.Node): name='outputFolder', label='Output Folder', description='Output folder for generated results.', - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), desc.File( name='outputCsv', label='Output Csv', description='Output file to generated results.', - value=lambda attr: os.path.join(desc.Node.internalFolder, attr.node.csv_name.value), + value=lambda attr: os.path.join("{nodeCacheFolder}", attr.node.csv_name.value), ) ] diff --git a/mrrs/nodes/benchmark/CleanMesh.py b/mrrs/nodes/benchmark/CleanMesh.py index 24c0285..5948850 100644 --- a/mrrs/nodes/benchmark/CleanMesh.py +++ b/mrrs/nodes/benchmark/CleanMesh.py @@ -43,7 +43,6 @@ class CleanMesh(CondaNode): name="output_mesh", label="Ouput Mesh", description="", - value=os.path.join(desc.Node.internalFolder, "cleaned_mesh.ply"), + value=os.path.join("{nodeCacheFolder}", "cleaned_mesh.ply"), ), ] - diff --git a/mrrs/nodes/benchmark/DepthMapComparison.py b/mrrs/nodes/benchmark/DepthMapComparison.py index b1616ee..0ea8d8e 100644 --- a/mrrs/nodes/benchmark/DepthMapComparison.py +++ b/mrrs/nodes/benchmark/DepthMapComparison.py @@ -89,13 +89,13 @@ class DepthMapComparison(desc.Node): name='output', label='Output', description='Output folder for generated results.', - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), desc.File( name='outputCsv', label='Output Csv', description='Output file to generated results.', - value=lambda attr: os.path.join(desc.Node.internalFolder, attr.node.csv_name.value), + value=lambda attr: os.path.join("{nodeCacheFolder}", attr.node.csv_name.value), ) ] diff --git a/mrrs/nodes/benchmark/LoadDataset.py b/mrrs/nodes/benchmark/LoadDataset.py index a58c164..00ff733 100644 --- a/mrrs/nodes/benchmark/LoadDataset.py +++ b/mrrs/nodes/benchmark/LoadDataset.py @@ -79,14 +79,14 @@ class LoadDataset(desc.Node): name='outputSfMData', label='SfM Data', description='Path to the output sfmdata file.', - value=desc.Node.internalFolder + 'sfm.sfm', + value='{nodeCacheFolder}/sfm.sfm', ), desc.File( name='depthMapsFolder', label='Depth map folder', description='Output folder for loaded depth maps.', - value=os.path.join(desc.Node.internalFolder, 'depth_maps'), + value=os.path.join('{nodeCacheFolder}', 'depth_maps'), # enabled=lambda attr: (attr.node.datasetType.value=='blendedMVG'), #FIXME: does not work!! doesnt actually hides in the node ), @@ -94,7 +94,7 @@ class LoadDataset(desc.Node): name='mesh', label='Mesh', description='Loaded mesh.', - value=os.path.join(desc.Node.internalFolder, 'mesh.ply'), + value=os.path.join('{nodeCacheFolder}', 'mesh.ply'), # enabled=lambda attr: (attr.node.datasetType.value=='DTU'), ), @@ -102,7 +102,7 @@ class LoadDataset(desc.Node): name='maskFolder', label='Mask Folder', description='Image mask folder. The mask describes the visibility of the object to be observed, on each view.', - value=os.path.join(desc.Node.internalFolder,'masks'), + value=os.path.join('{nodeCacheFolder}', 'masks'), # enabled=lambda attr: (attr.node.datasetType.value=='DTU'), ), @@ -112,7 +112,7 @@ class LoadDataset(desc.Node): label='DepthMapsDisplay', description='Generated depth maps.', semantic='image', - value=os.path.join(desc.Node.internalFolder, + value=os.path.join('{nodeCacheFolder}', 'depth_maps', '_depthMap.exr'), advanced=True, visible=False @@ -123,7 +123,7 @@ class LoadDataset(desc.Node): label='MasksDisplay', description='Generated masks.', semantic='image', - value=os.path.join(desc.Node.internalFolder, + value=os.path.join('{nodeCacheFolder}', 'masks', '.png'), advanced=True, visible=False @@ -134,7 +134,7 @@ class LoadDataset(desc.Node): label='landMarksProjDisplay', description='Generated images for landmarl projection.', semantic='image', - value=os.path.join(desc.Node.internalFolder, + value=os.path.join('{nodeCacheFolder}', 'lm_projs', '.png'), advanced=True, enabled=lambda attr: attr.node.landMarksProj.value, @@ -146,7 +146,7 @@ class LoadDataset(desc.Node): label='MeshDisplay', description='MeshDisplay', semantic='3D', - value=os.path.join(desc.Node.internalFolder, + value=os.path.join('{nodeCacheFolder}', 'mesh_display.ply'), advanced=True, visible=False diff --git a/mrrs/nodes/benchmark/MeshComparison.py b/mrrs/nodes/benchmark/MeshComparison.py index 6795dc4..58f5b07 100644 --- a/mrrs/nodes/benchmark/MeshComparison.py +++ b/mrrs/nodes/benchmark/MeshComparison.py @@ -57,14 +57,14 @@ def env_file(self): name='output_dir', label='Output Directory', description='''''', - value=desc.Node.internalFolder, + value='{nodeCacheFolder}', ), desc.File( name='vizMeshtoGT', label='Distance Mesh to GT', description='''''', - value=os.path.join(desc.Node.internalFolder, "vis_data2gt.pc.ply"), + value=os.path.join("{nodeCacheFolder}", "vis_data2gt.pc.ply"), semantic="3D", group='', ), @@ -73,7 +73,7 @@ def env_file(self): name='vizGTtoMesh', label='Distance GT to Mesg', description='''''', - value=os.path.join(desc.Node.internalFolder, "vis_gt2data.pc.ply"), + value=os.path.join("{nodeCacheFolder}", "vis_gt2data.pc.ply"), semantic="3D", group='', ), diff --git a/mrrs/nodes/colmap/AutomaticReconstructor.py b/mrrs/nodes/colmap/AutomaticReconstructor.py index 6fec91a..b310e36 100644 --- a/mrrs/nodes/colmap/AutomaticReconstructor.py +++ b/mrrs/nodes/colmap/AutomaticReconstructor.py @@ -28,13 +28,13 @@ class ColmapAutomaticReconstructor(desc.CommandLineNode): name='workspace_path', label='Output Folder', description='''Output Folder.''', - value=desc.Node.internalFolder, + value='{nodeCacheFolder}', ), desc.File( name='output_pc', label='Output point cloud', description='''Output point cloud.''', - value=os.path.join(desc.Node.internalFolder, 'dense\\0\\fused.ply'), + value=os.path.join('{nodeCacheFolder}', 'dense\\0\\fused.ply'), group='', ), ] diff --git a/mrrs/nodes/colmap/Colmap2MeshroomSfmConvertions.py b/mrrs/nodes/colmap/Colmap2MeshroomSfmConvertions.py index 036c578..7d818a0 100644 --- a/mrrs/nodes/colmap/Colmap2MeshroomSfmConvertions.py +++ b/mrrs/nodes/colmap/Colmap2MeshroomSfmConvertions.py @@ -268,7 +268,7 @@ class Colmap2MeshroomSfmConvertion(desc.Node): name='outputSfm', label='Output Sfm', description='Path to the output SfM file.', - value=os.path.join(desc.Node.internalFolder, "sfmdata.sfm"), + value=os.path.join("{nodeCacheFolder}", "sfmdata.sfm"), ), ] diff --git a/mrrs/nodes/colmap/DelaunayMesher.py b/mrrs/nodes/colmap/DelaunayMesher.py index d339b88..37a2f0d 100644 --- a/mrrs/nodes/colmap/DelaunayMesher.py +++ b/mrrs/nodes/colmap/DelaunayMesher.py @@ -30,7 +30,7 @@ class DelaunayMesher(desc.CommandLineNode): name='output_path', label='OutputPath', description='Output path.', - value=os.path.join(desc.Node.internalFolder, "mesh_delaunay.ply"), + value=os.path.join("{nodeCacheFolder}", "mesh_delaunay.ply"), ), ] diff --git a/mrrs/nodes/colmap/FeatureExtraction.py b/mrrs/nodes/colmap/FeatureExtraction.py index 9530e62..1884267 100644 --- a/mrrs/nodes/colmap/FeatureExtraction.py +++ b/mrrs/nodes/colmap/FeatureExtraction.py @@ -64,19 +64,19 @@ class ColmapFeatureExtraction(desc.CommandLineNode): name='database_path', label='Sensor Database', description='''Camera sensor width database path.''', - value=os.path.join(desc.Node.internalFolder, "colmap_database.db"), + value=os.path.join("{nodeCacheFolder}", "colmap_database.db"), ), desc.File( name='image_list_path', label='Used Images', description='''Used images (if from .sfm)''', - value=os.path.join(desc.Node.internalFolder, "used_images.txt"), + value=os.path.join("{nodeCacheFolder}", "used_images.txt"), ), desc.File( name='image_path', label='Images Directory', description='''Path to images directory.''', - value=os.path.join(desc.Node.internalFolder, "images"), + value=os.path.join("{nodeCacheFolder}", "images"), ), ] diff --git a/mrrs/nodes/colmap/FeatureMatching.py b/mrrs/nodes/colmap/FeatureMatching.py index a3992a3..c421eaf 100644 --- a/mrrs/nodes/colmap/FeatureMatching.py +++ b/mrrs/nodes/colmap/FeatureMatching.py @@ -35,7 +35,7 @@ class ColmapFeatureMatching(desc.CommandLineNode): name='database_path', label='OutputDatabasePath', description='Output database path.', - value=os.path.join(desc.Node.internalFolder, 'colmap_database_matches.db'), + value=os.path.join('{nodeCacheFolder}', 'colmap_database_matches.db'), ), ] diff --git a/mrrs/nodes/colmap/ImageUndistorder.py b/mrrs/nodes/colmap/ImageUndistorder.py index 326b86c..c19bb49 100644 --- a/mrrs/nodes/colmap/ImageUndistorder.py +++ b/mrrs/nodes/colmap/ImageUndistorder.py @@ -50,7 +50,7 @@ class ColmapImageUndistorder(desc.CommandLineNode): name='output_path', label='Ouptut Path', description='''Output path path.''', - value=os.path.join(desc.Node.internalFolder), + value='{nodeCacheFolder}', ), ] diff --git a/mrrs/nodes/colmap/ImportColmapDepthMaps.py b/mrrs/nodes/colmap/ImportColmapDepthMaps.py index a32d86a..b6f5005 100644 --- a/mrrs/nodes/colmap/ImportColmapDepthMaps.py +++ b/mrrs/nodes/colmap/ImportColmapDepthMaps.py @@ -72,7 +72,7 @@ class ImportColmapDepthMaps(desc.Node): name='depthMapFolder', label='Depth maps folder', description='Generated depth maps folder.', - value=desc.Node.internalFolder, + value='{nodeCacheFolder}', ), #for viz desc.File( @@ -80,7 +80,7 @@ class ImportColmapDepthMaps(desc.Node): label='Depth maps', description='Generated depth maps.', semantic='image', - value=desc.Node.internalFolder + '_depthMap.exr', + value='{nodeCacheFolder}/_depthMap.exr', ), ] diff --git a/mrrs/nodes/colmap/Mapper.py b/mrrs/nodes/colmap/Mapper.py index dae77cd..0dc23a4 100644 --- a/mrrs/nodes/colmap/Mapper.py +++ b/mrrs/nodes/colmap/Mapper.py @@ -106,27 +106,27 @@ class ColmapMapper(desc.CommandLineNode): name='output_path', label='BaseOutputPath', description='Base Output path.', - value=desc.Node.internalFolder, + value='{nodeCacheFolder}', ), desc.File( name='output_path0', label='OutputPath0', description='Output path 0.', - value=os.path.join(desc.Node.internalFolder, "0"), + value=os.path.join("{nodeCacheFolder}", "0"), group="" ), # desc.File( # name='cameras', # label='Cameras', # description='Ouptut camera file', - # value=os.path.join(desc.Node.internalFolder, "0", "cameras.bin"), + # value=os.path.join("{nodeCacheFolder}", "0", "cameras.bin"), # group="" # ), desc.File( name='database_path', label='OutputDatabasePath', description='Output database path', - value=os.path.join(desc.Node.internalFolder, 'colmap_database_mapper.db'), + value=os.path.join('{nodeCacheFolder}', 'colmap_database_mapper.db'), ), ] diff --git a/mrrs/nodes/colmap/Meshroom2ColmapSfmConvertions.py b/mrrs/nodes/colmap/Meshroom2ColmapSfmConvertions.py index 491ab49..3433228 100644 --- a/mrrs/nodes/colmap/Meshroom2ColmapSfmConvertions.py +++ b/mrrs/nodes/colmap/Meshroom2ColmapSfmConvertions.py @@ -49,27 +49,27 @@ class Meshroom2ColmapSfmConvertions(desc.CommandLineNode): name='preparedSfm',#ugly hack to have an input that can change label='preparedSfm', description='SfMData file prepared for colmap.', - value=os.path.join(desc.Node.internalFolder, "prepared_sfm.json"), + value=os.path.join("{nodeCacheFolder}", "prepared_sfm.json"), advanced=True, ), desc.File( name='output', label='Output Folder', description='Path to the output SfM Data file.', - value=desc.Node.internalFolder, + value='{nodeCacheFolder}', ), desc.File( name='imageDirectory', label='Image Directory', description='', - value=os.path.join(desc.Node.internalFolder, "images"), + value=os.path.join("{nodeCacheFolder}", "images"), group="" ), desc.File( name='sparseDirectory', label='Sparse Directory', description='', - value=os.path.join(desc.Node.internalFolder, "sparse"), + value=os.path.join("{nodeCacheFolder}", "sparse"), group="" ), ] diff --git a/mrrs/nodes/colmap/PatchMatchStereo.py b/mrrs/nodes/colmap/PatchMatchStereo.py index efa9306..b73a95f 100644 --- a/mrrs/nodes/colmap/PatchMatchStereo.py +++ b/mrrs/nodes/colmap/PatchMatchStereo.py @@ -33,7 +33,7 @@ class PatchMatchStereo(desc.CommandLineNode): name='workspace_path', label='OutputPath', description='Output path.', - value=os.path.join(desc.Node.internalFolder, "workspace"), + value=os.path.join("{nodeCacheFolder}", "workspace"), ), ] diff --git a/mrrs/nodes/colmap/PoissonMesher.py b/mrrs/nodes/colmap/PoissonMesher.py index e404a88..e01f5f9 100644 --- a/mrrs/nodes/colmap/PoissonMesher.py +++ b/mrrs/nodes/colmap/PoissonMesher.py @@ -40,7 +40,7 @@ class PoissonMesher(desc.CommandLineNode): name='output_mesh', label='OutputMesh', description='Output mesh.', - value=os.path.join(desc.Node.internalFolder, "mesh_poisson.ply"), + value=os.path.join("{nodeCacheFolder}", "mesh_poisson.ply"), ), ] diff --git a/mrrs/nodes/colmap/StereoFusion.py b/mrrs/nodes/colmap/StereoFusion.py index d6c9d46..a423636 100644 --- a/mrrs/nodes/colmap/StereoFusion.py +++ b/mrrs/nodes/colmap/StereoFusion.py @@ -35,7 +35,7 @@ class StereoFusion(desc.CommandLineNode): name='output_path', label='OutputPath', description='Output point cloud path.', - value=os.path.join(desc.Node.internalFolder, "workspace", "fused.ply"), + value=os.path.join("{nodeCacheFolder}", "workspace", "fused.ply"), ), @@ -43,7 +43,7 @@ class StereoFusion(desc.CommandLineNode): name='workspace_path', label='Output Workspace Folder', description='Output workspace path.', - value=os.path.join(desc.Node.internalFolder, "workspace"), + value=os.path.join("{nodeCacheFolder}", "workspace"), ), ] diff --git a/mrrs/nodes/depth_map/VizMVSNet.py b/mrrs/nodes/depth_map/VizMVSNet.py index 8d5cd02..b605335 100644 --- a/mrrs/nodes/depth_map/VizMVSNet.py +++ b/mrrs/nodes/depth_map/VizMVSNet.py @@ -102,7 +102,7 @@ def env_file(self): name="outputFolder", label="Output Folder", description="Path to a folder in which the computed results are stored.", - value=desc.Node.internalFolder, + value='{nodeCacheFolder}', ), desc.StringParam( @@ -117,9 +117,9 @@ def env_file(self): label='Depth maps', description='Generated depth maps.', semantic='image', - value=desc.Node.internalFolder + '_depthMap.exr', + value='{nodeCacheFolder}/_depthMap.exr', group='', - ) + ), ] def processChunk(self, chunk): diff --git a/mrrs/nodes/nerf/nerfstudio.py b/mrrs/nodes/nerf/nerfstudio.py index 6896cfa..6639d64 100644 --- a/mrrs/nodes/nerf/nerfstudio.py +++ b/mrrs/nodes/nerf/nerfstudio.py @@ -172,7 +172,7 @@ class NeRFStudio(CondaNode): name='output', label='Output', description='Output folder.', - value=desc.Node.internalFolder, + value='{nodeCacheFolder}', group="", ), ] diff --git a/mrrs/nodes/nerf/nerfstudio_export.py b/mrrs/nodes/nerf/nerfstudio_export.py index 601a405..22e0757 100644 --- a/mrrs/nodes/nerf/nerfstudio_export.py +++ b/mrrs/nodes/nerf/nerfstudio_export.py @@ -117,7 +117,7 @@ class NeRFStudioExport(CondaNode): name='output-dir', label='Output', description='Output folder.', - value=desc.Node.internalFolder, + value='{nodeCacheFolder}', ), ] diff --git a/mrrs/nodes/reality_capture/ExportXMP.py b/mrrs/nodes/reality_capture/ExportXMP.py index 0ff086f..d4d09a8 100644 --- a/mrrs/nodes/reality_capture/ExportXMP.py +++ b/mrrs/nodes/reality_capture/ExportXMP.py @@ -51,7 +51,7 @@ class ExportXMP(desc.Node): name='outputFolder', label='Output folder', description='Path to the XMP folder', - value=desc.Node.internalFolder, + value='{nodeCacheFolder}', ), ] diff --git a/mrrs/nodes/reality_capture/ImportXMP.py b/mrrs/nodes/reality_capture/ImportXMP.py index 582df6b..c773f8f 100644 --- a/mrrs/nodes/reality_capture/ImportXMP.py +++ b/mrrs/nodes/reality_capture/ImportXMP.py @@ -55,7 +55,7 @@ class ImportXMP(desc.Node): name='outputSfMData', label='outputSfMData', description='Path to the outputSfMData.', - value=os.path.join(desc.Node.internalFolder, "outputSfMData.sfm"), + value=os.path.join("{nodeCacheFolder}", "outputSfMData.sfm"), ), ] diff --git a/mrrs/nodes/render/CreateTrackingMarkers.py b/mrrs/nodes/render/CreateTrackingMarkers.py index a24446f..e54974a 100644 --- a/mrrs/nodes/render/CreateTrackingMarkers.py +++ b/mrrs/nodes/render/CreateTrackingMarkers.py @@ -167,7 +167,7 @@ class CreateTrackingMarkers(desc.Node): name='sfmData', label='SfmData', description='Input SfM file.', - value=desc.Node.internalFolder, + value='{nodeCacheFolder}', ), desc.File( @@ -247,13 +247,13 @@ class CreateTrackingMarkers(desc.Node): name='outputFile', label='Output Json', description='Output file to place track info to.', - value=os.path.join(desc.Node.internalFolder, "track_objects.json"), + value=os.path.join("{nodeCacheFolder}", "track_objects.json"), ), desc.File( name='outputImages', label='Output Images', description='Output image regex if any', - value=os.path.join(desc.Node.internalFolder, "*.png"), + value=os.path.join("{nodeCacheFolder}", "*.png"), ), ] diff --git a/mrrs/nodes/render/Render360.py b/mrrs/nodes/render/Render360.py index 50572b9..760fd1b 100644 --- a/mrrs/nodes/render/Render360.py +++ b/mrrs/nodes/render/Render360.py @@ -39,13 +39,13 @@ class Render360(desc.CommandLineNode): name='outputFolder', label='Folder', description='Output folder for generated images.', - value=desc.Node.internalFolder, + value='{nodeCacheFolder}', ), desc.File( name='outputImages', label='outputImages', description='Output generated images.', - value=os.path.join(desc.Node.internalFolder, "*.png"), + value=os.path.join("{nodeCacheFolder}", "*.png"), ), ] diff --git a/mrrs/nodes/render/RenderMesh.py b/mrrs/nodes/render/RenderMesh.py index 1b343c4..224a296 100644 --- a/mrrs/nodes/render/RenderMesh.py +++ b/mrrs/nodes/render/RenderMesh.py @@ -44,7 +44,7 @@ class RenderMesh(desc.CommandLineNode): name='output', label='OutputFolder', description='Output folder for generated images.', - value=desc.Node.internalFolder, + value='{nodeCacheFolder}', ), desc.File( @@ -52,6 +52,6 @@ class RenderMesh(desc.CommandLineNode): label='Overlay', description='Rendered views.', semantic='image', - value=desc.Node.internalFolder + '.exr', + value='{nodeCacheFolder}/.exr', ), ] diff --git a/mrrs/nodes/render/RenderOverlay.py b/mrrs/nodes/render/RenderOverlay.py index 552ec3d..a2aa8e9 100644 --- a/mrrs/nodes/render/RenderOverlay.py +++ b/mrrs/nodes/render/RenderOverlay.py @@ -42,7 +42,7 @@ class RenderOverlay(desc.CommandLineNode): name='outputFolder', label='Folder', description='Output folder for generated images.', - value=desc.Node.internalFolder, + value='{nodeCacheFolder}', ), desc.File( @@ -50,6 +50,6 @@ class RenderOverlay(desc.CommandLineNode): label='Overlay', description='Rendered views with markers overlay.', semantic='image', - value=desc.Node.internalFolder + '.jpg', + value='{nodeCacheFolder}/.jpg', ), ] diff --git a/mrrs/nodes/render/SyntheticDataset.py b/mrrs/nodes/render/SyntheticDataset.py index ac541fe..bb074df 100644 --- a/mrrs/nodes/render/SyntheticDataset.py +++ b/mrrs/nodes/render/SyntheticDataset.py @@ -83,19 +83,19 @@ class SyntheticDataset(desc.InitNode, desc.CommandLineNode): name='outputFolder', label='Folder', description='Output folder for generated ground truth files.', - value=desc.Node.internalFolder, + value='{nodeCacheFolder}', ), desc.File( name='fakeCameraInit', label='Fake Camera Init', description='Sfm file containing the ground truth views and intrinsics (without poses).', - value=desc.Node.internalFolder+'/gt_no_pose.sfm' + value='{nodeCacheFolder}/gt_no_pose.sfm' ), desc.File( name='groundTruth', label='Ground truth', description='Sfm file containing the ground truth views, intrinsics and poses.', - value=desc.Node.internalFolder+'/gt.sfm', + value='{nodeCacheFolder}/gt.sfm', ), ] diff --git a/mrrs/nodes/stereo_photometry/MS_PS/MS_PS.py b/mrrs/nodes/stereo_photometry/MS_PS/MS_PS.py index 8ede127..2a6012e 100644 --- a/mrrs/nodes/stereo_photometry/MS_PS/MS_PS.py +++ b/mrrs/nodes/stereo_photometry/MS_PS/MS_PS.py @@ -42,6 +42,6 @@ class MS_PS(desc.CommandLineNode): name="outputPath", label="Output Folder", description="Path to the output folder.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), ] diff --git a/mrrs/nodes/stereo_photometry/Uni_MS_PS/Uni_MS_PS.py b/mrrs/nodes/stereo_photometry/Uni_MS_PS/Uni_MS_PS.py index 6e9376a..881a23f 100644 --- a/mrrs/nodes/stereo_photometry/Uni_MS_PS/Uni_MS_PS.py +++ b/mrrs/nodes/stereo_photometry/Uni_MS_PS/Uni_MS_PS.py @@ -34,6 +34,6 @@ class Uni_MS_PS(desc.CommandLineNode): name="outputPath", label="Output Folder", description="Path to the output folder.", - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ) ] diff --git a/mrrs/nodes/utils/CalibTransform.py b/mrrs/nodes/utils/CalibTransform.py index 2a0bf20..f5754d9 100644 --- a/mrrs/nodes/utils/CalibTransform.py +++ b/mrrs/nodes/utils/CalibTransform.py @@ -120,7 +120,7 @@ class CalibTransform(desc.Node): name='outputSfMData', label='Output', description='Output SfM data.', - value=os.path.join(desc.Node.internalFolder, "sfm.sfm"), + value=os.path.join("{nodeCacheFolder}", "sfm.sfm"), ) ] diff --git a/mrrs/nodes/utils/ComputeNormals.py b/mrrs/nodes/utils/ComputeNormals.py index 17b1f3b..6fe51df 100644 --- a/mrrs/nodes/utils/ComputeNormals.py +++ b/mrrs/nodes/utils/ComputeNormals.py @@ -47,14 +47,14 @@ class ComputeNormals(desc.Node): name='outputNormalFolder', label='Output normal Folder', description='Output folder for refined depth maps.', - value=desc.Node.internalFolder, + value='{nodeCacheFolder}', ), desc.File( name='normals', label='Normal maps', description='Generated depth maps.', semantic='image', - value=desc.Node.internalFolder + '.exr', + value='{nodeCacheFolder}/.exr', group='', # do not export on the command line ), ] diff --git a/mrrs/nodes/utils/ConvertImages.py b/mrrs/nodes/utils/ConvertImages.py index 38d5a8e..89baf77 100644 --- a/mrrs/nodes/utils/ConvertImages.py +++ b/mrrs/nodes/utils/ConvertImages.py @@ -126,13 +126,13 @@ class ConvertImages(desc.Node): name='outputFolder', label='Output Folder', description='Output folder for converted images.', - value=desc.Node.internalFolder, + value='{nodeCacheFolder}', ), desc.File( name='outputSfMData', label='SfMData', description='Path to the output sfmdata file.', - value=desc.Node.internalFolder + 'sfm.sfm', + value='{nodeCacheFolder}/sfm.sfm', ) ] diff --git a/mrrs/nodes/utils/CopyData.py b/mrrs/nodes/utils/CopyData.py index 14a67ba..fe15ee4 100644 --- a/mrrs/nodes/utils/CopyData.py +++ b/mrrs/nodes/utils/CopyData.py @@ -53,7 +53,7 @@ class CopyData(desc.Node): name='outputFile', label='Output File', description='Path to the output file.', - value=lambda attr: os.path.join(desc.Node.internalFolder, os.path.basename(attr.node.inputFile.value) if attr.node.outputName.value =="" else attr.node.outputName.value), + value=lambda attr: os.path.join('{nodeCacheFolder}', os.path.basename(attr.node.inputFile.value) if attr.node.outputName.value =="" else attr.node.outputName.value), ), ] diff --git a/mrrs/nodes/utils/CutSfm.py b/mrrs/nodes/utils/CutSfm.py index 1c813f7..3476896 100644 --- a/mrrs/nodes/utils/CutSfm.py +++ b/mrrs/nodes/utils/CutSfm.py @@ -53,7 +53,7 @@ class CutSfm(desc.Node): name='outputSfMData', label='Output', description='Output SfM data.', - value=os.path.join(desc.Node.internalFolder, "sfm.sfm"), + value=os.path.join("{nodeCacheFolder}", "sfm.sfm"), ) ] diff --git a/mrrs/nodes/utils/DepthMapTransform.py b/mrrs/nodes/utils/DepthMapTransform.py index d2bdbac..be6cb30 100644 --- a/mrrs/nodes/utils/DepthMapTransform.py +++ b/mrrs/nodes/utils/DepthMapTransform.py @@ -150,14 +150,14 @@ class DepthMapTransform(desc.Node): name='output', label='Output', description='Output folder for generated results.', - value=desc.Node.internalFolder, + value="{nodeCacheFolder}", ), desc.File( name='depth', label='Depth maps', description='Generated depth maps.', semantic='image', - value=desc.Node.internalFolder + '_depthMap.exr', + value='{nodeCacheFolder}/_depthMap.exr', group='', ), ] diff --git a/mrrs/nodes/utils/InjectSfmData.py b/mrrs/nodes/utils/InjectSfmData.py index 7881230..a67b3a5 100644 --- a/mrrs/nodes/utils/InjectSfmData.py +++ b/mrrs/nodes/utils/InjectSfmData.py @@ -23,14 +23,14 @@ class InjectSfmData(desc.Node): name='sourceSfmData', label='Source SfmData', description='Input sfm file containing the fields to be injected in target SfMData.', - value=desc.Node.internalFolder, + value='{nodeCacheFolder}', ), desc.File( name='targetSfmData', label='Target SfmData', description='Input SfM file containing the SfM data to be injected with data from the source SfMData.', - value=desc.Node.internalFolder, + value='{nodeCacheFolder}', ), desc.ChoiceParam( @@ -57,7 +57,7 @@ class InjectSfmData(desc.Node): name='outputSfMData', label='SfMData', description='Path to the output SfMData file.', - value=desc.Node.internalFolder + 'sfm.sfm', + value='{nodeCacheFolder}/sfm.sfm', ), ] diff --git a/mrrs/nodes/utils/MeshTransform.py b/mrrs/nodes/utils/MeshTransform.py index f06c1dc..1772d4d 100644 --- a/mrrs/nodes/utils/MeshTransform.py +++ b/mrrs/nodes/utils/MeshTransform.py @@ -21,7 +21,7 @@ class MeshTransform(desc.Node):#FIXME: abstract this Dataset, scan folder etc... name='inputMesh', label='Input mesh', description='Input mesh.', - value=desc.Node.internalFolder, + value='{nodeCacheFolder}', ), desc.File( name='inputTransform', @@ -67,7 +67,7 @@ class MeshTransform(desc.Node):#FIXME: abstract this Dataset, scan folder etc... name='outputMesh', label='Output mesh', description='Output Mesh.', - value=desc.Node.internalFolder + 'mesh.ply',#pb: not extention!!! variable output + value='{nodeCacheFolder}/mesh.ply',#pb: not extention!!! variable output ), ] diff --git a/mrrs/nodes/utils/Seq2Video.py b/mrrs/nodes/utils/Seq2Video.py index 1a2a171..515e72b 100644 --- a/mrrs/nodes/utils/Seq2Video.py +++ b/mrrs/nodes/utils/Seq2Video.py @@ -44,6 +44,6 @@ class Seq2Video(desc.CommandLineNode): name='outputVideo', label='Output Video', description=''' ''', - value=os.path.join(desc.Node.internalFolder, 'video'), - ), + value=os.path.join('{nodeCacheFolder}', 'video'), + ), ]