From 3d33134ca9698a37cfef0f1bc05be7a3716039aa Mon Sep 17 00:00:00 2001 From: ChemicalXandco <32775248+ChemicalXandco@users.noreply.github.com> Date: Sun, 14 Feb 2021 16:12:39 +0000 Subject: [PATCH 1/2] [ui] add support for node categories --- meshroom/core/desc.py | 1 + meshroom/ui/app.py | 2 +- meshroom/ui/qml/Controls/SearchBar.qml | 5 ++ meshroom/ui/qml/GraphEditor/GraphEditor.qml | 77 ++++++++++++++++----- 4 files changed, 68 insertions(+), 17 deletions(-) diff --git a/meshroom/core/desc.py b/meshroom/core/desc.py index 84f6f10ca7..fb73a024d2 100644 --- a/meshroom/core/desc.py +++ b/meshroom/core/desc.py @@ -420,6 +420,7 @@ class Node(object): size = StaticNodeSize(1) parallelization = None documentation = '' + category = 'Other' def __init__(self): pass diff --git a/meshroom/ui/app.py b/meshroom/ui/app.py index 52d50497a9..110daec47b 100644 --- a/meshroom/ui/app.py +++ b/meshroom/ui/app.py @@ -117,7 +117,7 @@ def __init__(self, args): components.registerTypes() # expose available node types that can be instantiated - self.engine.rootContext().setContextProperty("_nodeTypes", sorted(nodesDesc.keys())) + self.engine.rootContext().setContextProperty("_nodeTypes", {n: {"category": nodesDesc[n].category} for n in sorted(nodesDesc.keys())}) # instantiate Reconstruction object self._undoStack = commands.UndoStack(self) diff --git a/meshroom/ui/qml/Controls/SearchBar.qml b/meshroom/ui/qml/Controls/SearchBar.qml index 2fffc71b30..9d759b44db 100644 --- a/meshroom/ui/qml/Controls/SearchBar.qml +++ b/meshroom/ui/qml/Controls/SearchBar.qml @@ -34,6 +34,11 @@ FocusScope { focus: true Layout.fillWidth: true selectByMouse: true + + // ensure the field has focus when the text is modified + onTextChanged: { + forceActiveFocus() + } } } } diff --git a/meshroom/ui/qml/GraphEditor/GraphEditor.qml b/meshroom/ui/qml/GraphEditor/GraphEditor.qml index 897d580219..2dbfec4c05 100755 --- a/meshroom/ui/qml/GraphEditor/GraphEditor.qml +++ b/meshroom/ui/qml/GraphEditor/GraphEditor.qml @@ -134,6 +134,22 @@ Item { // add node via the proper command in uigraph var node = uigraph.addNewNode(nodeType, spawnPosition) selectNode(node) + close() + } + + function parseCategories() + { + // organize nodes based on their category + // {"category1": ["node1", "node2"], "category2": ["node3", "node4"]} + let categories = {}; + for (const [name, data] of Object.entries(root.nodeTypesModel)) { + let category = data["category"]; + if (categories[category] === undefined) { + categories[category] = []; + } + categories[category].push(name) + } + return categories } onVisibleChanged: { @@ -150,11 +166,10 @@ Item { width: parent.width } - Repeater { - model: root.nodeTypesModel - - // Create Menu items from available node types model - delegate: MenuItem { + // menuItemDelegate is wrapped in a component so it can be used in both the search bar and sub-menus + Component { + id: menuItemDelegateComponent + MenuItem { id: menuItemDelegate font.pointSize: 8 padding: 3 @@ -169,17 +184,20 @@ Item { Keys.forwardTo: [searchBar.textField] Keys.onPressed: { event.accepted = false; - switch(event.key) - { - case Qt.Key_Return: - case Qt.Key_Enter: - // create node on validation (Enter/Return keys) - newNodeMenu.createNode(modelData); - newNodeMenu.close(); - event.accepted = true; - break; - default: - searchBar.textField.forceActiveFocus(); + switch(event.key) { + case Qt.Key_Return: + case Qt.Key_Enter: + // create node on validation (Enter/Return keys) + newNodeMenu.createNode(modelData); + event.accepted = true; + break; + case Qt.Key_Up: + case Qt.Key_Down: + case Qt.Key_Left: + case Qt.Key_Right: + break; // ignore if arrow key was pressed to let the menu be controlled + default: + searchBar.forceActiveFocus(); } } // Create node on mouse click @@ -199,6 +217,33 @@ Item { ] } } + + Repeater { + id: nodeMenuRepeater + model: searchBar.text != "" ? Object.keys(root.nodeTypesModel) : undefined + + // create Menu items from available items + delegate: menuItemDelegateComponent + } + + // Dynamically add the menu categories + Instantiator { + model: !(searchBar.text != "") ? Object.keys(newNodeMenu.parseCategories()) : undefined + onObjectAdded: newNodeMenu.insertMenu(index+1, object ) // add sub-menu under the search bar + onObjectRemoved: newNodeMenu.removeMenu(object) + + delegate: Menu { + title: modelData + id: newNodeSubMenu + + Instantiator { + model: newNodeMenu.visible && newNodeSubMenu.activeFocus ? newNodeMenu.parseCategories()[modelData] : undefined + onObjectAdded: newNodeSubMenu.insertItem(index, object) + onObjectRemoved: newNodeSubMenu.removeItem(object) + delegate: menuItemDelegateComponent + } + } + } } // Informative contextual menu when graph is read-only From e18f815af90a53388cf81281a6af4b266d224c50 Mon Sep 17 00:00:00 2001 From: ChemicalXandco <32775248+ChemicalXandco@users.noreply.github.com> Date: Sun, 14 Feb 2021 17:03:42 +0000 Subject: [PATCH 2/2] [nodes] add node categories --- meshroom/nodes/aliceVision/CameraCalibration.py | 2 ++ meshroom/nodes/aliceVision/CameraInit.py | 1 + meshroom/nodes/aliceVision/CameraLocalization.py | 2 ++ meshroom/nodes/aliceVision/CameraRigCalibration.py | 2 ++ meshroom/nodes/aliceVision/CameraRigLocalization.py | 2 ++ meshroom/nodes/aliceVision/ConvertMesh.py | 2 ++ meshroom/nodes/aliceVision/ConvertSfMFormat.py | 1 + meshroom/nodes/aliceVision/DepthMap.py | 1 + meshroom/nodes/aliceVision/DepthMapFilter.py | 1 + meshroom/nodes/aliceVision/ExportAnimatedCamera.py | 1 + meshroom/nodes/aliceVision/ExportColoredPointCloud.py | 2 ++ meshroom/nodes/aliceVision/ExportMatches.py | 2 ++ meshroom/nodes/aliceVision/ExportMaya.py | 1 + meshroom/nodes/aliceVision/FeatureExtraction.py | 1 + meshroom/nodes/aliceVision/FeatureMatching.py | 1 + meshroom/nodes/aliceVision/FeatureRepeatability.py | 2 ++ meshroom/nodes/aliceVision/GlobalSfM.py | 1 + meshroom/nodes/aliceVision/ImageMatching.py | 1 + meshroom/nodes/aliceVision/ImageMatchingMultiSfM.py | 1 + meshroom/nodes/aliceVision/ImageProcessing.py | 1 + meshroom/nodes/aliceVision/KeyframeSelection.py | 1 + meshroom/nodes/aliceVision/LdrToHdrCalibration.py | 2 +- meshroom/nodes/aliceVision/LdrToHdrMerge.py | 1 + meshroom/nodes/aliceVision/LdrToHdrSampling.py | 1 + meshroom/nodes/aliceVision/LightingEstimation.py | 2 ++ meshroom/nodes/aliceVision/MergeMeshes.py | 2 ++ meshroom/nodes/aliceVision/MeshDecimate.py | 2 +- meshroom/nodes/aliceVision/MeshDenoising.py | 1 + meshroom/nodes/aliceVision/MeshFiltering.py | 2 ++ meshroom/nodes/aliceVision/MeshResampling.py | 2 +- meshroom/nodes/aliceVision/Meshing.py | 1 + meshroom/nodes/aliceVision/PanoramaCompositing.py | 3 +-- meshroom/nodes/aliceVision/PanoramaEstimation.py | 1 + meshroom/nodes/aliceVision/PanoramaInit.py | 1 + meshroom/nodes/aliceVision/PanoramaMerging.py | 3 +-- meshroom/nodes/aliceVision/PanoramaPrepareImages.py | 1 + meshroom/nodes/aliceVision/PanoramaSeams.py | 2 +- meshroom/nodes/aliceVision/PanoramaWarping.py | 2 +- meshroom/nodes/aliceVision/PrepareDenseScene.py | 1 + meshroom/nodes/aliceVision/Publish.py | 1 + meshroom/nodes/aliceVision/SfMAlignment.py | 1 + meshroom/nodes/aliceVision/SfMTransfer.py | 1 + meshroom/nodes/aliceVision/SfMTransform.py | 1 + meshroom/nodes/aliceVision/SketchfabUpload.py | 1 + meshroom/nodes/aliceVision/StructureFromMotion.py | 1 + meshroom/nodes/aliceVision/Texturing.py | 1 + meshroom/ui/qml/GraphEditor/GraphEditor.qml | 2 +- 47 files changed, 58 insertions(+), 10 deletions(-) diff --git a/meshroom/nodes/aliceVision/CameraCalibration.py b/meshroom/nodes/aliceVision/CameraCalibration.py index 3609387c16..888138cc3a 100644 --- a/meshroom/nodes/aliceVision/CameraCalibration.py +++ b/meshroom/nodes/aliceVision/CameraCalibration.py @@ -6,6 +6,8 @@ class CameraCalibration(desc.CommandLineNode): commandLine = 'aliceVision_cameraCalibration {allParams}' + category = 'Utils' + inputs = [ desc.File( name='input', diff --git a/meshroom/nodes/aliceVision/CameraInit.py b/meshroom/nodes/aliceVision/CameraInit.py index 2042ea1050..d39a70b010 100644 --- a/meshroom/nodes/aliceVision/CameraInit.py +++ b/meshroom/nodes/aliceVision/CameraInit.py @@ -116,6 +116,7 @@ class CameraInit(desc.CommandLineNode): size = desc.DynamicNodeSize('viewpoints') + category = 'Sparse Reconstruction' documentation = ''' This node describes your dataset. It lists the Viewpoints candidates, the guess about the type of optic, the initial focal length and which images are sharing the same internal camera parameters, as well as potential cameras rigs. diff --git a/meshroom/nodes/aliceVision/CameraLocalization.py b/meshroom/nodes/aliceVision/CameraLocalization.py index 08a14e412c..484304d6aa 100644 --- a/meshroom/nodes/aliceVision/CameraLocalization.py +++ b/meshroom/nodes/aliceVision/CameraLocalization.py @@ -7,6 +7,8 @@ class CameraLocalization(desc.CommandLineNode): commandLine = 'aliceVision_cameraLocalization {allParams}' + category = 'Utils' + inputs = [ desc.File( name='sfmdata', diff --git a/meshroom/nodes/aliceVision/CameraRigCalibration.py b/meshroom/nodes/aliceVision/CameraRigCalibration.py index fe189d082f..f12ca6c401 100644 --- a/meshroom/nodes/aliceVision/CameraRigCalibration.py +++ b/meshroom/nodes/aliceVision/CameraRigCalibration.py @@ -7,6 +7,8 @@ class CameraRigCalibration(desc.CommandLineNode): commandLine = 'aliceVision_rigCalibration {allParams}' + category = 'Utils' + inputs = [ desc.File( name='sfmdata', diff --git a/meshroom/nodes/aliceVision/CameraRigLocalization.py b/meshroom/nodes/aliceVision/CameraRigLocalization.py index 527a6ed603..94e9514f96 100644 --- a/meshroom/nodes/aliceVision/CameraRigLocalization.py +++ b/meshroom/nodes/aliceVision/CameraRigLocalization.py @@ -7,6 +7,8 @@ class CameraRigLocalization(desc.CommandLineNode): commandLine = 'aliceVision_rigLocalization {allParams}' + category = 'Utils' + inputs = [ desc.File( name='sfmdata', diff --git a/meshroom/nodes/aliceVision/ConvertMesh.py b/meshroom/nodes/aliceVision/ConvertMesh.py index 9fa3c16196..1a59cc8b0a 100644 --- a/meshroom/nodes/aliceVision/ConvertMesh.py +++ b/meshroom/nodes/aliceVision/ConvertMesh.py @@ -5,6 +5,8 @@ class ConvertMesh(desc.CommandLineNode): commandLine = 'aliceVision_convertMesh {allParams}' + + category = 'Utils' documentation = '''This node allows to convert a mesh to another format.''' inputs = [ diff --git a/meshroom/nodes/aliceVision/ConvertSfMFormat.py b/meshroom/nodes/aliceVision/ConvertSfMFormat.py index 687ad5c496..324329fbba 100644 --- a/meshroom/nodes/aliceVision/ConvertSfMFormat.py +++ b/meshroom/nodes/aliceVision/ConvertSfMFormat.py @@ -7,6 +7,7 @@ class ConvertSfMFormat(desc.CommandLineNode): commandLine = 'aliceVision_convertSfMFormat {allParams}' size = desc.DynamicNodeSize('input') + category = 'Utils' documentation = ''' Convert an SfM scene from one file format to another. It can also be used to remove specific parts of from an SfM scene (like filter all 3D landmarks or filter 2D observations). diff --git a/meshroom/nodes/aliceVision/DepthMap.py b/meshroom/nodes/aliceVision/DepthMap.py index 1051ab23e6..bb6ca66e77 100644 --- a/meshroom/nodes/aliceVision/DepthMap.py +++ b/meshroom/nodes/aliceVision/DepthMap.py @@ -10,6 +10,7 @@ class DepthMap(desc.CommandLineNode): parallelization = desc.Parallelization(blockSize=3) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + category = 'Dense Reconstruction' documentation = ''' For each camera that have been estimated by the Structure-From-Motion, it estimates the depth value per pixel. diff --git a/meshroom/nodes/aliceVision/DepthMapFilter.py b/meshroom/nodes/aliceVision/DepthMapFilter.py index 77f891403a..d2d9c313db 100644 --- a/meshroom/nodes/aliceVision/DepthMapFilter.py +++ b/meshroom/nodes/aliceVision/DepthMapFilter.py @@ -10,6 +10,7 @@ class DepthMapFilter(desc.CommandLineNode): parallelization = desc.Parallelization(blockSize=10) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + category = 'Dense Reconstruction' documentation = ''' Filter depth map values that are not coherent in multiple depth maps. This allows to filter unstable points before starting the fusion of all depth maps in the Meshing node. diff --git a/meshroom/nodes/aliceVision/ExportAnimatedCamera.py b/meshroom/nodes/aliceVision/ExportAnimatedCamera.py index eefeb48900..7fef4a1115 100644 --- a/meshroom/nodes/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/nodes/aliceVision/ExportAnimatedCamera.py @@ -6,6 +6,7 @@ class ExportAnimatedCamera(desc.CommandLineNode): commandLine = 'aliceVision_exportAnimatedCamera {allParams}' + category = 'Export' documentation = ''' Convert cameras from an SfM scene into an animated cameras in Alembic file format. Based on the input image filenames, it will recognize the input video sequence to create an animated camera. diff --git a/meshroom/nodes/aliceVision/ExportColoredPointCloud.py b/meshroom/nodes/aliceVision/ExportColoredPointCloud.py index ced880b46e..a922a4a965 100644 --- a/meshroom/nodes/aliceVision/ExportColoredPointCloud.py +++ b/meshroom/nodes/aliceVision/ExportColoredPointCloud.py @@ -6,6 +6,8 @@ class ExportColoredPointCloud(desc.CommandLineNode): commandLine = 'aliceVision_exportColoredPointCloud {allParams}' + category = 'Export' + inputs = [ desc.File( name='input', diff --git a/meshroom/nodes/aliceVision/ExportMatches.py b/meshroom/nodes/aliceVision/ExportMatches.py index 53525165df..24a45d584e 100644 --- a/meshroom/nodes/aliceVision/ExportMatches.py +++ b/meshroom/nodes/aliceVision/ExportMatches.py @@ -7,6 +7,8 @@ class ExportMatches(desc.CommandLineNode): commandLine = 'aliceVision_exportMatches {allParams}' size = desc.DynamicNodeSize('input') + category = 'Export' + inputs = [ desc.File( name='input', diff --git a/meshroom/nodes/aliceVision/ExportMaya.py b/meshroom/nodes/aliceVision/ExportMaya.py index 9328852685..aeea1b8122 100644 --- a/meshroom/nodes/aliceVision/ExportMaya.py +++ b/meshroom/nodes/aliceVision/ExportMaya.py @@ -6,6 +6,7 @@ class ExportMaya(desc.CommandLineNode): commandLine = 'aliceVision_exportMeshroomMaya {allParams}' + category = 'Export' documentation = ''' Export a scene for Autodesk Maya, with an Alembic file describing the SfM: cameras and 3D points. It will export half-size undistorted images to use as image planes for cameras and also export thumbnails. diff --git a/meshroom/nodes/aliceVision/FeatureExtraction.py b/meshroom/nodes/aliceVision/FeatureExtraction.py index 4390ddba82..c733fc61f3 100644 --- a/meshroom/nodes/aliceVision/FeatureExtraction.py +++ b/meshroom/nodes/aliceVision/FeatureExtraction.py @@ -9,6 +9,7 @@ class FeatureExtraction(desc.CommandLineNode): parallelization = desc.Parallelization(blockSize=40) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + category = 'Sparse Reconstruction' documentation = ''' This node extracts distinctive groups of pixels that are, to some extent, invariant to changing camera viewpoints during image acquisition. Hence, a feature in the scene should have similar feature descriptions in all images. diff --git a/meshroom/nodes/aliceVision/FeatureMatching.py b/meshroom/nodes/aliceVision/FeatureMatching.py index d5bf61f9dc..9b5d23a77b 100644 --- a/meshroom/nodes/aliceVision/FeatureMatching.py +++ b/meshroom/nodes/aliceVision/FeatureMatching.py @@ -9,6 +9,7 @@ class FeatureMatching(desc.CommandLineNode): parallelization = desc.Parallelization(blockSize=20) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + category = 'Sparse Reconstruction' documentation = ''' This node performs the matching of all features between the candidate image pairs. diff --git a/meshroom/nodes/aliceVision/FeatureRepeatability.py b/meshroom/nodes/aliceVision/FeatureRepeatability.py index 746ba551a0..162fb455b2 100644 --- a/meshroom/nodes/aliceVision/FeatureRepeatability.py +++ b/meshroom/nodes/aliceVision/FeatureRepeatability.py @@ -9,7 +9,9 @@ class FeatureRepeatability(desc.CommandLineNode): # parallelization = desc.Parallelization(blockSize=40) # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + category = 'Utils' documentation = ''' +Compare feature/descriptor matching repeatability on some dataset with known homography motions. ''' inputs = [ diff --git a/meshroom/nodes/aliceVision/GlobalSfM.py b/meshroom/nodes/aliceVision/GlobalSfM.py index 49410fea08..7a0242d452 100644 --- a/meshroom/nodes/aliceVision/GlobalSfM.py +++ b/meshroom/nodes/aliceVision/GlobalSfM.py @@ -10,6 +10,7 @@ class GlobalSfM(desc.CommandLineNode): commandLine = 'aliceVision_globalSfM {allParams}' size = desc.DynamicNodeSize('input') + category = 'Sparse Reconstruction' documentation = ''' Performs the Structure-From-Motion with a global approach. It is known to be faster but less robust to challenging datasets than the Incremental approach. diff --git a/meshroom/nodes/aliceVision/ImageMatching.py b/meshroom/nodes/aliceVision/ImageMatching.py index 2a1e60f888..62b9e2323c 100644 --- a/meshroom/nodes/aliceVision/ImageMatching.py +++ b/meshroom/nodes/aliceVision/ImageMatching.py @@ -8,6 +8,7 @@ class ImageMatching(desc.CommandLineNode): commandLine = 'aliceVision_imageMatching {allParams}' size = desc.DynamicNodeSize('input') + category = 'Sparse Reconstruction' documentation = ''' The goal of this node is to select the image pairs to match. The ambition is to find the images that are looking to the same areas of the scene. Thanks to this node, the FeatureMatching node will only compute the matches between the selected image pairs. diff --git a/meshroom/nodes/aliceVision/ImageMatchingMultiSfM.py b/meshroom/nodes/aliceVision/ImageMatchingMultiSfM.py index 2d506227a5..a10ce9a303 100644 --- a/meshroom/nodes/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/nodes/aliceVision/ImageMatchingMultiSfM.py @@ -9,6 +9,7 @@ class ImageMatchingMultiSfM(desc.CommandLineNode): # use both SfM inputs to define Node's size size = desc.MultiDynamicNodeSize(['input', 'inputB']) + category = 'Sparse Reconstruction' documentation = ''' The goal of this node is to select the image pairs to match in the context of an SfM augmentation. The ambition is to find the images that are looking to the same areas of the scene. diff --git a/meshroom/nodes/aliceVision/ImageProcessing.py b/meshroom/nodes/aliceVision/ImageProcessing.py index 653a160055..f2079f2bb4 100644 --- a/meshroom/nodes/aliceVision/ImageProcessing.py +++ b/meshroom/nodes/aliceVision/ImageProcessing.py @@ -34,6 +34,7 @@ class ImageProcessing(desc.CommandLineNode): # parallelization = desc.Parallelization(blockSize=40) # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + category = 'Utils' documentation = ''' Convert or apply filtering to the input images. ''' diff --git a/meshroom/nodes/aliceVision/KeyframeSelection.py b/meshroom/nodes/aliceVision/KeyframeSelection.py index 987af42367..db035ec1c6 100644 --- a/meshroom/nodes/aliceVision/KeyframeSelection.py +++ b/meshroom/nodes/aliceVision/KeyframeSelection.py @@ -7,6 +7,7 @@ class KeyframeSelection(desc.CommandLineNode): commandLine = 'aliceVision_utils_keyframeSelection {allParams}' + category = 'Utils' documentation = ''' Allows to extract keyframes from a video and insert metadata. It can extract frames from a synchronized multi-cameras rig. diff --git a/meshroom/nodes/aliceVision/LdrToHdrCalibration.py b/meshroom/nodes/aliceVision/LdrToHdrCalibration.py index 2c16734e77..5b6ebbbf0d 100644 --- a/meshroom/nodes/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/nodes/aliceVision/LdrToHdrCalibration.py @@ -26,10 +26,10 @@ def findMetadata(d, keys, defaultValue): class LdrToHdrCalibration(desc.CommandLineNode): commandLine = 'aliceVision_LdrToHdrCalibration {allParams}' size = desc.DynamicNodeSize('input') - cpu = desc.Level.INTENSIVE ram = desc.Level.NORMAL + category = 'Panorama HDR' documentation = ''' Calibrate LDR to HDR response curve from samples ''' diff --git a/meshroom/nodes/aliceVision/LdrToHdrMerge.py b/meshroom/nodes/aliceVision/LdrToHdrMerge.py index b22a25650e..391ae9e398 100644 --- a/meshroom/nodes/aliceVision/LdrToHdrMerge.py +++ b/meshroom/nodes/aliceVision/LdrToHdrMerge.py @@ -28,6 +28,7 @@ class LdrToHdrMerge(desc.CommandLineNode): parallelization = desc.Parallelization(blockSize=2) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + category = 'Panorama HDR' documentation = ''' Calibrate LDR to HDR response curve from samples ''' diff --git a/meshroom/nodes/aliceVision/LdrToHdrSampling.py b/meshroom/nodes/aliceVision/LdrToHdrSampling.py index 8c86246653..a32f86c195 100644 --- a/meshroom/nodes/aliceVision/LdrToHdrSampling.py +++ b/meshroom/nodes/aliceVision/LdrToHdrSampling.py @@ -45,6 +45,7 @@ class LdrToHdrSampling(desc.CommandLineNode): parallelization = desc.Parallelization(blockSize=2) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + category = 'Panorama HDR' documentation = ''' Sample pixels from Low range images for HDR creation ''' diff --git a/meshroom/nodes/aliceVision/LightingEstimation.py b/meshroom/nodes/aliceVision/LightingEstimation.py index dc5b188fb4..c9d44b1a9d 100644 --- a/meshroom/nodes/aliceVision/LightingEstimation.py +++ b/meshroom/nodes/aliceVision/LightingEstimation.py @@ -6,6 +6,8 @@ class LightingEstimation(desc.CommandLineNode): commandLine = 'aliceVision_utils_lightingEstimation {allParams}' + category = 'Utils' + inputs = [ desc.File( name='input', diff --git a/meshroom/nodes/aliceVision/MergeMeshes.py b/meshroom/nodes/aliceVision/MergeMeshes.py index 12240fe4c9..1669dde52d 100644 --- a/meshroom/nodes/aliceVision/MergeMeshes.py +++ b/meshroom/nodes/aliceVision/MergeMeshes.py @@ -5,6 +5,8 @@ class MergeMeshes(desc.CommandLineNode): commandLine = 'aliceVision_utils_mergeMeshes {allParams}' + + category = 'Utils' documentation = ''' This node allows to merge two meshes in one. diff --git a/meshroom/nodes/aliceVision/MeshDecimate.py b/meshroom/nodes/aliceVision/MeshDecimate.py index 8b928350b0..4294e85848 100644 --- a/meshroom/nodes/aliceVision/MeshDecimate.py +++ b/meshroom/nodes/aliceVision/MeshDecimate.py @@ -5,10 +5,10 @@ class MeshDecimate(desc.CommandLineNode): commandLine = 'aliceVision_meshDecimate {allParams}' - cpu = desc.Level.NORMAL ram = desc.Level.NORMAL + category = 'Mesh Post-Processing' documentation = ''' This node allows to reduce the density of the Mesh. ''' diff --git a/meshroom/nodes/aliceVision/MeshDenoising.py b/meshroom/nodes/aliceVision/MeshDenoising.py index 1b6863edd5..aa118bbe06 100644 --- a/meshroom/nodes/aliceVision/MeshDenoising.py +++ b/meshroom/nodes/aliceVision/MeshDenoising.py @@ -6,6 +6,7 @@ class MeshDenoising(desc.CommandLineNode): commandLine = 'aliceVision_meshDenoising {allParams}' + category = 'Mesh Post-Processing' documentation = ''' This experimental node allows to reduce noise from a Mesh. for now, the parameters are difficult to control and vary a lot from one dataset to another. diff --git a/meshroom/nodes/aliceVision/MeshFiltering.py b/meshroom/nodes/aliceVision/MeshFiltering.py index 9cc4994c04..9327a3b041 100644 --- a/meshroom/nodes/aliceVision/MeshFiltering.py +++ b/meshroom/nodes/aliceVision/MeshFiltering.py @@ -5,6 +5,8 @@ class MeshFiltering(desc.CommandLineNode): commandLine = 'aliceVision_meshFiltering {allParams}' + + category = 'Dense Reconstruction' documentation = ''' This node applies a Laplacian filtering to remove local defects from the raw Meshing cut. ''' diff --git a/meshroom/nodes/aliceVision/MeshResampling.py b/meshroom/nodes/aliceVision/MeshResampling.py index 64c4cab717..d9a836cd36 100644 --- a/meshroom/nodes/aliceVision/MeshResampling.py +++ b/meshroom/nodes/aliceVision/MeshResampling.py @@ -5,10 +5,10 @@ class MeshResampling(desc.CommandLineNode): commandLine = 'aliceVision_meshResampling {allParams}' - cpu = desc.Level.NORMAL ram = desc.Level.NORMAL + category = 'Mesh Post-Processing' documentation = ''' This node allows to recompute the mesh surface with a new topology and uniform density. ''' diff --git a/meshroom/nodes/aliceVision/Meshing.py b/meshroom/nodes/aliceVision/Meshing.py index b2970e62ad..2019eb38ea 100644 --- a/meshroom/nodes/aliceVision/Meshing.py +++ b/meshroom/nodes/aliceVision/Meshing.py @@ -9,6 +9,7 @@ class Meshing(desc.CommandLineNode): cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE + category = 'Dense Reconstruction' documentation = ''' This node creates a dense geometric surface representation of the scene. diff --git a/meshroom/nodes/aliceVision/PanoramaCompositing.py b/meshroom/nodes/aliceVision/PanoramaCompositing.py index e5270c6646..4e4b0fb9fd 100644 --- a/meshroom/nodes/aliceVision/PanoramaCompositing.py +++ b/meshroom/nodes/aliceVision/PanoramaCompositing.py @@ -9,13 +9,12 @@ class PanoramaCompositing(desc.CommandLineNode): commandLine = 'aliceVision_panoramaCompositing {allParams}' size = desc.DynamicNodeSize('input') - parallelization = desc.Parallelization(blockSize=5) commandLineRange = '--rangeIteration {rangeIteration} --rangeSize {rangeBlockSize}' - cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE + category = 'Panorama HDR' documentation = ''' Once the images have been transformed geometrically (in PanoramaWarping), they have to be fused together in a single panorama image which looks like a single photography. diff --git a/meshroom/nodes/aliceVision/PanoramaEstimation.py b/meshroom/nodes/aliceVision/PanoramaEstimation.py index 1cc147fa92..6e78dd7ce7 100644 --- a/meshroom/nodes/aliceVision/PanoramaEstimation.py +++ b/meshroom/nodes/aliceVision/PanoramaEstimation.py @@ -10,6 +10,7 @@ class PanoramaEstimation(desc.CommandLineNode): commandLine = 'aliceVision_panoramaEstimation {allParams}' size = desc.DynamicNodeSize('input') + category = 'Panorama HDR' documentation = ''' Estimate relative camera rotations between input images. ''' diff --git a/meshroom/nodes/aliceVision/PanoramaInit.py b/meshroom/nodes/aliceVision/PanoramaInit.py index 458cb82d19..7b341b8fd8 100644 --- a/meshroom/nodes/aliceVision/PanoramaInit.py +++ b/meshroom/nodes/aliceVision/PanoramaInit.py @@ -7,6 +7,7 @@ class PanoramaInit(desc.CommandLineNode): commandLine = 'aliceVision_panoramaInit {allParams}' size = desc.DynamicNodeSize('input') + category = 'Panorama HDR' documentation = ''' This node allows to setup the Panorama: diff --git a/meshroom/nodes/aliceVision/PanoramaMerging.py b/meshroom/nodes/aliceVision/PanoramaMerging.py index 72ed3b7ed6..6fd4b912bb 100644 --- a/meshroom/nodes/aliceVision/PanoramaMerging.py +++ b/meshroom/nodes/aliceVision/PanoramaMerging.py @@ -9,11 +9,10 @@ class PanoramaMerging(desc.CommandLineNode): commandLine = 'aliceVision_panoramaMerging {allParams}' size = desc.DynamicNodeSize('input') - cpu = desc.Level.NORMAL ram = desc.Level.INTENSIVE - + category = 'Panorama HDR' documentation = ''' Merge all inputs coming from PanoramaComposiring ''' diff --git a/meshroom/nodes/aliceVision/PanoramaPrepareImages.py b/meshroom/nodes/aliceVision/PanoramaPrepareImages.py index 67a6357bb3..1add6c4795 100644 --- a/meshroom/nodes/aliceVision/PanoramaPrepareImages.py +++ b/meshroom/nodes/aliceVision/PanoramaPrepareImages.py @@ -9,6 +9,7 @@ class PanoramaPrepareImages(desc.CommandLineNode): commandLine = 'aliceVision_panoramaPrepareImages {allParams}' size = desc.DynamicNodeSize('input') + category = 'Panorama HDR' documentation = ''' Prepare images for Panorama pipeline: ensures that images orientations are coherent. ''' diff --git a/meshroom/nodes/aliceVision/PanoramaSeams.py b/meshroom/nodes/aliceVision/PanoramaSeams.py index 389c0eb408..754a9208d1 100644 --- a/meshroom/nodes/aliceVision/PanoramaSeams.py +++ b/meshroom/nodes/aliceVision/PanoramaSeams.py @@ -9,10 +9,10 @@ class PanoramaSeams(desc.CommandLineNode): commandLine = 'aliceVision_panoramaSeams {allParams}' size = desc.DynamicNodeSize('input') - cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE + category = 'Panorama HDR' documentation = ''' Estimate the seams lines between the inputs to provide an optimal compositing in a further node ''' diff --git a/meshroom/nodes/aliceVision/PanoramaWarping.py b/meshroom/nodes/aliceVision/PanoramaWarping.py index de25238b75..33d3e0a97e 100644 --- a/meshroom/nodes/aliceVision/PanoramaWarping.py +++ b/meshroom/nodes/aliceVision/PanoramaWarping.py @@ -9,10 +9,10 @@ class PanoramaWarping(desc.CommandLineNode): commandLine = 'aliceVision_panoramaWarping {allParams}' size = desc.DynamicNodeSize('input') - parallelization = desc.Parallelization(blockSize=5) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + category = 'Panorama HDR' documentation = ''' Compute the image warping for each input image in the panorama coordinate system. ''' diff --git a/meshroom/nodes/aliceVision/PrepareDenseScene.py b/meshroom/nodes/aliceVision/PrepareDenseScene.py index 3087eee6d9..ac2fd0ecc1 100644 --- a/meshroom/nodes/aliceVision/PrepareDenseScene.py +++ b/meshroom/nodes/aliceVision/PrepareDenseScene.py @@ -9,6 +9,7 @@ class PrepareDenseScene(desc.CommandLineNode): parallelization = desc.Parallelization(blockSize=40) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + category = 'Dense Reconstruction' documentation = ''' This node export undistorted images so the depth map and texturing can be computed on Pinhole images without distortion. ''' diff --git a/meshroom/nodes/aliceVision/Publish.py b/meshroom/nodes/aliceVision/Publish.py index 556499f9e4..4ca8b055bb 100644 --- a/meshroom/nodes/aliceVision/Publish.py +++ b/meshroom/nodes/aliceVision/Publish.py @@ -11,6 +11,7 @@ class Publish(desc.Node): size = desc.DynamicNodeSize('inputFiles') + category = 'Export' documentation = ''' This node allows to copy files into a specific folder. ''' diff --git a/meshroom/nodes/aliceVision/SfMAlignment.py b/meshroom/nodes/aliceVision/SfMAlignment.py index 0b21005175..60d6d2e38d 100644 --- a/meshroom/nodes/aliceVision/SfMAlignment.py +++ b/meshroom/nodes/aliceVision/SfMAlignment.py @@ -9,6 +9,7 @@ class SfMAlignment(desc.CommandLineNode): commandLine = 'aliceVision_utils_sfmAlignment {allParams}' size = desc.DynamicNodeSize('input') + category = 'Utils' documentation = ''' This node allows to change the coordinate system of one SfM scene to align it on another one. diff --git a/meshroom/nodes/aliceVision/SfMTransfer.py b/meshroom/nodes/aliceVision/SfMTransfer.py index caf0c30a24..dd0f8c4a16 100644 --- a/meshroom/nodes/aliceVision/SfMTransfer.py +++ b/meshroom/nodes/aliceVision/SfMTransfer.py @@ -9,6 +9,7 @@ class SfMTransfer(desc.CommandLineNode): commandLine = 'aliceVision_utils_sfmTransfer {allParams}' size = desc.DynamicNodeSize('input') + category = 'Utils' documentation = ''' This node allows to transfer poses and/or intrinsics form one SfM scene onto another one. ''' diff --git a/meshroom/nodes/aliceVision/SfMTransform.py b/meshroom/nodes/aliceVision/SfMTransform.py index 3bd2f006d0..9547470ba5 100644 --- a/meshroom/nodes/aliceVision/SfMTransform.py +++ b/meshroom/nodes/aliceVision/SfMTransform.py @@ -9,6 +9,7 @@ class SfMTransform(desc.CommandLineNode): commandLine = 'aliceVision_utils_sfmTransform {allParams}' size = desc.DynamicNodeSize('input') + category = 'Utils' documentation = ''' This node allows to change the coordinate system of one SfM scene. diff --git a/meshroom/nodes/aliceVision/SketchfabUpload.py b/meshroom/nodes/aliceVision/SketchfabUpload.py index 06571b0f5c..2d980e4d7a 100644 --- a/meshroom/nodes/aliceVision/SketchfabUpload.py +++ b/meshroom/nodes/aliceVision/SketchfabUpload.py @@ -52,6 +52,7 @@ def progressUpdate(size=None, progress=None, logManager=None): class SketchfabUpload(desc.Node): size = desc.DynamicNodeSize('inputFiles') + category = 'Export' documentation = ''' Upload a textured mesh on Sketchfab. ''' diff --git a/meshroom/nodes/aliceVision/StructureFromMotion.py b/meshroom/nodes/aliceVision/StructureFromMotion.py index c70b382c15..afc50f943d 100644 --- a/meshroom/nodes/aliceVision/StructureFromMotion.py +++ b/meshroom/nodes/aliceVision/StructureFromMotion.py @@ -7,6 +7,7 @@ class StructureFromMotion(desc.CommandLineNode): commandLine = 'aliceVision_incrementalSfM {allParams}' size = desc.DynamicNodeSize('input') + category = 'Sparse Reconstruction' documentation = ''' This node will analyze feature matches to understand the geometric relationship behind all the 2D observations, and infer the rigid scene structure (3D points) with the pose (position and orientation) and internal calibration of all cameras. diff --git a/meshroom/nodes/aliceVision/Texturing.py b/meshroom/nodes/aliceVision/Texturing.py index f388e44ffc..cc8308da47 100644 --- a/meshroom/nodes/aliceVision/Texturing.py +++ b/meshroom/nodes/aliceVision/Texturing.py @@ -8,6 +8,7 @@ class Texturing(desc.CommandLineNode): cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE + category = 'Dense Reconstruction' documentation = ''' This node computes the texturing on the mesh. diff --git a/meshroom/ui/qml/GraphEditor/GraphEditor.qml b/meshroom/ui/qml/GraphEditor/GraphEditor.qml index 2dbfec4c05..0c312de821 100755 --- a/meshroom/ui/qml/GraphEditor/GraphEditor.qml +++ b/meshroom/ui/qml/GraphEditor/GraphEditor.qml @@ -228,7 +228,7 @@ Item { // Dynamically add the menu categories Instantiator { - model: !(searchBar.text != "") ? Object.keys(newNodeMenu.parseCategories()) : undefined + model: !(searchBar.text != "") ? Object.keys(newNodeMenu.parseCategories()).sort() : undefined onObjectAdded: newNodeMenu.insertMenu(index+1, object ) // add sub-menu under the search bar onObjectRemoved: newNodeMenu.removeMenu(object)