Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ScenePreview] fix: 1st chunk was computing all views #2108

Merged
merged 2 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion meshroom/nodes/blender/ScenePreview.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
8 changes: 4 additions & 4 deletions meshroom/nodes/blender/scripts/preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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")
Expand Down