BaiLong Posted November 19, 2015 Share Posted November 19, 2015 Hi, I would like to use python to run whatever functions are executed when you use the righ click menu > "Change Type...". Because I have to do it on a number of nodes. Does anyone have an idea how to change the operator type of a node? That's what I have so far: changeNodes = [] objs = hou.root().recursiveGlob('*', hou.nodeTypeFilter.Obj) for o in objs: if o.type().name() == 'nodeType_A': changeNodes.append(o) for c in changeNodes: #change nodeType to 'nodeType_B' #Keep name #Keep Parameters Any ideas? If there is a way to just get whatever code is run when I use the "Change Type..." that would already be of huge help! Thanks a lot! --Markus Quote Link to comment Share on other sites More sharing options...
michael Posted November 19, 2015 Share Posted November 19, 2015 hou.Node.changeNodeType() 1 Quote Link to comment Share on other sites More sharing options...
BaiLong Posted November 19, 2015 Author Share Posted November 19, 2015 Oh wow, that was simple! I wasn't thinking of looking in the API for the operations on Node. I only looked at NodeType...Thanks so much!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.