Hello,
I cannot find the way to use the text of a table cell to get a parameter.
Here is what I try:
param = op('paramList')[1, 2]
print(param) # I obtain 'Opacity'
paramPath = 'parent().par.' + param
print(paramPath) # I obtain 'parent().par.Opacity'
How can I obtain the value of the parameter ?
I tried:
value = paramPath.eval()
value = paramPath.val
value = val(paramPath)
But obtained only an error.
Any idea to solve that?
Thank in advance,
Jacques
SOLUTION
Thank to Elburz, here is the solution
param = op('paramList')[1, 2].val
value = getattr(parent().par, param, 1)
# to set the value
parent().pars(p)[0].val = value