[core] Value need to be exposed without quotes to allow to compose simple expressions

For instance, on the Meshing node "outputMesh" param expression is:
value="{cache}/{nodeType}/{uid0}/mesh.{outputMeshFileTypeValue}",

So the extension here should not contains quotes.
This commit is contained in:
Fabien Castan 2024-02-02 19:47:52 +01:00
parent a35f1c72e2
commit c6d0933d4f
3 changed files with 24 additions and 17 deletions

View file

@ -516,10 +516,10 @@ class ListAttribute(Attribute):
def getValueStr(self, withQuotes=True):
assert(isinstance(self.value, ListModel))
if self.attributeDesc.joinChar == ' ':
return self.attributeDesc.joinChar.join([v.getValueStr(withQuotes=True) for v in self.value])
return self.attributeDesc.joinChar.join([v.getValueStr(withQuotes=withQuotes) for v in self.value])
else:
v = self.attributeDesc.joinChar.join([v.getValueStr(withQuotes=False) for v in self.value])
if v:
if withQuotes and v:
return '"{}"'.format(v)
return v