diff options
author | Loïc Vital <mugulmotion@gmail.com> | 2022-11-03 13:11:11 +0300 |
---|---|---|
committer | Loïc Vital <mugulmotion@gmail.com> | 2022-11-03 13:14:53 +0300 |
commit | 630c6e06ec134f6be228f73e6281d3f6def5c654 (patch) | |
tree | 03d9ee890343b5e67a4e576d4ffaea3c1bafffc7 | |
parent | 69ebe4477bfde501a8250061553457bd2513571f (diff) |
[core] non-exclusive choice param: handle string value by splitting around commaslv/paramOverrideList
-rwxr-xr-x | bin/meshroom_batch | 3 | ||||
-rw-r--r-- | meshroom/core/desc.py | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/bin/meshroom_batch b/bin/meshroom_batch index 5aa75276..57843c33 100755 --- a/bin/meshroom_batch +++ b/bin/meshroom_batch @@ -157,9 +157,6 @@ with multiview.GraphModification(graph): if not result: raise ValueError('Invalid param override: ' + str(p)) node, t, param, value = result.groups() - multiValues = value.split(',') - if len(multiValues) > 1: - value = multiValues if t == ':': nodesOfType = graph.nodesOfType(node) if not nodesOfType: diff --git a/meshroom/core/desc.py b/meshroom/core/desc.py index 6766f729..53e08ab8 100644 --- a/meshroom/core/desc.py +++ b/meshroom/core/desc.py @@ -311,6 +311,9 @@ class ChoiceParam(Param): if self.exclusive: return self.conformValue(value) + if isinstance(value, pyCompatibility.basestring): + value = value.split(',') + if not isinstance(value, pyCompatibility.Iterable): raise ValueError('Non exclusive ChoiceParam value should be iterable (param:{}, value:{}, type:{})'.format(self.name, value, type(value))) return [self.conformValue(v) for v in value] |