From c04f9697731cd5127ff424b2124b13396ec51e1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= Date: Mon, 10 Jul 2023 17:00:02 +0200 Subject: [PATCH 1/2] [blender] preview: fix first chunk behaviour --- meshroom/nodes/blender/scripts/preview.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meshroom/nodes/blender/scripts/preview.py b/meshroom/nodes/blender/scripts/preview.py index ef32b337df..e9e7a2758e 100644 --- a/meshroom/nodes/blender/scripts/preview.py +++ b/meshroom/nodes/blender/scripts/preview.py @@ -23,11 +23,11 @@ def createParser(): help="sfmData with the animated camera.", ) parser.add_argument( - "--rangeStart", type=int, required=False, + "--rangeStart", type=int, required=False, default=-1, help="Range start for processing views. Set to -1 to process all views.", ) parser.add_argument( - "--rangeSize", type=int, required=False, + "--rangeSize", type=int, required=False, default=0, help="Range size for processing views.", ) parser.add_argument( @@ -321,8 +321,8 @@ def main(): setupPointCloudShading(sceneObj, color, args.particleSize) print("Retrieve range") - rangeStart = args.rangeStart if args.rangeStart else -1 - rangeSize = args.rangeSize if args.rangeSize else -1 + rangeStart = args.rangeStart + rangeSize = args.rangeSize if rangeStart != -1: if rangeStart < 0 or rangeSize < 0 or rangeStart > len(views): print("Invalid range") From 2d6d87cad13490c49aefc6fb67ef6121c9197e4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= Date: Mon, 10 Jul 2023 17:54:12 +0200 Subject: [PATCH 2/2] [nodes] ScenePreview: increase block size to 40 --- meshroom/nodes/blender/ScenePreview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/nodes/blender/ScenePreview.py b/meshroom/nodes/blender/ScenePreview.py index e002c2fc15..fb39467e5e 100644 --- a/meshroom/nodes/blender/ScenePreview.py +++ b/meshroom/nodes/blender/ScenePreview.py @@ -8,7 +8,7 @@ class ScenePreview(desc.CommandLineNode): commandLine = '{blenderCmdValue} -b --python {scriptValue} -- {allParams}' size = desc.DynamicNodeSize('cameras') - parallelization = desc.Parallelization(blockSize=10) + parallelization = desc.Parallelization(blockSize=40) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' category = 'Utils'