hey everyone , i have a small issue that i can't figure it out , i'm trying to automate the Proxy meshes swap for rendering , i made a script for that , it refreshes and switches index based on the OP (pre-render/post-render) , when i tried it without loop for one single switch it worked just fine , but after adding the loop no errors occurs but only renders the Proxies . any help or idea would be appreciated .
importhouparent_node=hou.node("/obj/tst_proxy")fornodeinparent_node.allSubChildren():ifnode.type().name()=="GFX_Proxy_Switch":parm=node.parm("newparameter")ifparm:parm.set(2)print(f"Set parameter 'newparameter' to 2 for node: {node.path()}")node.cook(force=True)print(f"Recooked node: {node.path()}")else:print(f"Parameter 'newparameter' not found on node: {node.path()}")