a = hou.parmTuple(path_diffuse + ‘/diff_color’) a.set((0.8, 0.8, 0.8))
ok It works.
Liste = a = hou.parmTuple(path_diffuse + ‘/diff_color’) a.set(Liste)
It don't works. I have tried different things, but I always gets
File “CPROGRA~1/Side Effects Software/Houdini 15.0.329/houdini/python2.7libs\hou.py”, line 25122, in set return _hou.ParmTuple_set(*args) InvalidSize: Invalid size.
fichier = open(source_file , ‘r’) for ligne in fichier: line = ligne.strip() Liste.append(line) fichier.close() a = hou.parmTuple(path_diffuse + ‘/diff_color’) a.set(Liste)
>>> print Liste
>>>
I cannot edit my list by removing the quotes (in a way procedural) while keeping tuples for the changes in my hou.parmTuple()… :?
In that case you can simply evaluate the string values to turn them into valid Python numerical types and set those. If you run something like eval('0.8, 0.8, 0.8') that should give you a 3 element tuple of float values which you can use to set.
Graham Thompson, Technical Artist @ Rockstar Games