wateryfield Posted February 9, 2016 Share Posted February 9, 2016 Hi. Guys. I got a huge work to do, there is a fbx file export form max,when i import it to houdini, it include too much parameters on Geo interface form max. So i want delete it all since it was useless. I make a sketch show what i want to do. I just want to remove the ss parameter form interface, not just delete the keyframes or expression. If there was something like hou.parm().destory() modules can do this. Thanks. Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted February 9, 2016 Share Posted February 9, 2016 ptg = your_node.parmTemplateGroup() ptg.remove(ptg.find("your_parm_name")) your_node.setParmTemplateGroup(ptg) 1 Quote Link to comment Share on other sites More sharing options...
wateryfield Posted February 9, 2016 Author Share Posted February 9, 2016 ptg = your_node.parmTemplateGroup() ptg.remove(ptg.find("your_parm_name")) your_node.setParmTemplateGroup(ptg) Thanks! Master The script works great. And if you get time, do you mind let me ask a basic python question again. So i have a geo1 in /obj lelvel, now i want get the geo1 name,then delete it, at last create a geo node named geo1 again. node = hou.node('/obj/geo1') name = node.name place = hou.node('/obj') place.createNode('geo') But the name variable was been remove before createNode, anyway to save the name variable. Thanks. Quote Link to comment Share on other sites More sharing options...
dennis.albus Posted February 10, 2016 Share Posted February 10, 2016 (edited) Hey, n.name is not a value, but a method of the node class. That means you are storing a reference to the method of the ObjNode class in your name variable. Naturally this method will be gone when you destroy the node. To get the name you have to call this method via node.name() which will return the name of the node as a string value. cheers, Dennis Edited February 10, 2016 by dennis.albus 1 Quote Link to comment Share on other sites More sharing options...
wateryfield Posted February 11, 2016 Author Share Posted February 11, 2016 Hey, n.name is not a value, but a method of the node class. That means you are storing a reference to the method of the ObjNode class in your name variable. Naturally this method will be gone when you destroy the node. To get the name you have to call this method via node.name() which will return the name of the node as a string value. cheers, Dennis Thanks, Dennis. I try to follow your idea, this was my code def name(node): return(node.name()) node = hou.node('/obj/geo2') name = name(node) node.destroy() geo = hou.node('/obj') geo.createNode("geo",name) It works. But is it right? I not good at code at all. Quote Link to comment Share on other sites More sharing options...
dennis.albus Posted February 11, 2016 Share Posted February 11, 2016 Yes that works. However there is no need to define a function just to return the name of the node. Maybe my explanation was not very clear. The method name() is already defined for nodes and can simply be called as soon as you have a node object. node = hou.node('/obj/geo2') name = node.name() node.destroy() geo = hou.node('/obj') geo.createNode("geo",name) 1 Quote Link to comment Share on other sites More sharing options...
wateryfield Posted February 11, 2016 Author Share Posted February 11, 2016 Yes that works. However there is no need to define a function just to return the name of the node. Maybe my explanation was not very clear. The method name() is already defined for nodes and can simply be called as soon as you have a node object. node = hou.node('/obj/geo2') name = node.name() node.destroy() geo = hou.node('/obj') geo.createNode("geo",name) Thanks! Dennis. Now i have a better understood of if. Quote Link to comment Share on other sites More sharing options...
Mzigaib Posted March 2, 2021 Share Posted March 2, 2021 (edited) Hi, Can you help me on how to remove a folder tab from the parameter inteface? Thanks! Edited March 2, 2021 by Mzigaib Quote Link to comment Share on other sites More sharing options...
Mzigaib Posted March 2, 2021 Share Posted March 2, 2021 Found it! Thanks anyway. 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.