ForEach

Stamp Expressin

Case of using number

stamp("..", "FORVALUE",0)

Case of using Group mask

opdigits(stamps("..", "FORVALUE",""))

With Multiparm Block Parameter(list) -case you want to set specific parameter at each cycle

Expression

ch("../parm" + stamp("..", "FORVALUE",0) )

*Example -to get bunch of transform information

Create Operator Path parameter under a Multiparm Block Folder

Add Transform inside ForEach and set Expression on every transform parameter

  • ch( chs("../parm" + stamp("..", "FORVALUE",0) ) + "/tx" )

Add inverted version of Transform

  • ch( chs("../parm" + ch("v") ) + "/tx" )
  • chs("../numrange2") - stamp("..", "FORVALUE",0) + 1 <=This is custom "v" means version
  • check invert

Set Switch for invert or not

This example can be digital asset and named "xformCollection"

then you can ran shelf script of below deep inside geometry nodes

sel = hou.selectedNodes()

if len(sel) == 1:

curPath = sel[0].parent()

pos = sel[0].position()

path = curPath

xpaths = []

while path.path() != '/obj':

xpaths.append(path.path())

path = path.parent()

print xpaths

xcol = curPath.createNode("xformCollection")

xcol.setPosition(pos + hou.Vector2(0,-1))

xcol.parm("xforms").set(len(xpaths))

for i in range(0,len(xpaths)):

xcol.parm("xform" + str(i + 1)).set(xpaths[i])