RogerW 3 Posted August 12 Hi all, I am having some trouble with the "on name change" event handler on an HDA. I want to be able to name nodes inside of my hda based off of a new name that I give the HDA after I have dropped it in my scene. The code works as a button but not when triggered on the change name event. I even tried hou.Parm.pressButton() in the on name changed even script but no dice... here is a sample : Quote def updatename(): hdaname = hou.node(".").name() mynode = hou.node(".").children()[0] mynode.setName(hdaname) print ("the nodes name has been changed to {}".format(hdaname)) attached a example otl as well... Is there any other way that I can do this.. Many Thanks change_my_name.hda Share this post Link to post Share on other sites
LaidlawFX 245 Posted August 13 Hello, This should work fine in the on name change event, without the button press node = kwargs["node"] hdaname = node.name() for child in node.children(): child.setName(hdaname) print ("the child node name has been changed to {}".format(hdaname)) As a warning though this style of renaming nodes will generally cause more issues than you are trying to solve. -Ben Share this post Link to post Share on other sites