Hi,
I need to manipulate some group names brought in via alembic. I need to append a ‘_’ to the group name to match some previously defined material groups, I can't just change the material node names as this would break some pipeline dependencies elsewhere.
So I can do this for a single tab/folder material by putting :
for node in hou.selectedNodes():
for parm in node.parms():
if node.evalParm('group1'):
old = node.evalParm('group1')
new = ‘_’ + old
node.parm('group1').set(new)
But when there are sub-material tabs, the group1 material group is just evaluated in the first tab as
'____________________________________________name'
ie, it accumulates all the sub material group1 tabs for each ‘_’ and applies this to only the first group1 tab.
Obviously because I am not looping specifically for each sub material tab/folder in turn. I've turned towards evaluating the parmTemplateGroup but then I just get <parmTemplateGroup> returned for each 'group1 field, not the rename. What am I missing?
Cheers