Magnus Pettersson Posted February 26, 2017 Share Posted February 26, 2017 Hello! Now when H16 is out with new node shapes. How can i change them in python scripts so you can for example change the node shape with a toggle on an asset etc? /Magnus Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted February 26, 2017 Share Posted February 26, 2017 there is a discussion about it on: https://sidefx.com/forum/topic/48364/ Quote Link to comment Share on other sites More sharing options...
Magnus Pettersson Posted February 26, 2017 Author Share Posted February 26, 2017 As far as I can tell they just discuss default shape settings and the creation of custom node shapes in that thread. I can set the default node shape in OPcustomize with opdefaultshape but i want to be able to change the shape on the fly with python. just like you would with the node color with node.setColor(hou.Color()) i would like to know if there is something similar for shapes like node.setShape("bulge") Quote Link to comment Share on other sites More sharing options...
Magnus Pettersson Posted February 26, 2017 Author Share Posted February 26, 2017 I found a way now! It wasnt the most obvious way to change shape but this is the way i found out: node.setUserData('nodeshape', "bulge") to get a list of all available node shapes : editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) shapes = editor.nodeShapes() print shapes 7 Quote Link to comment Share on other sites More sharing options...
Simonvdb Posted August 21, 2020 Share Posted August 21, 2020 @Magnus Pettersson oh thanks a lot! needed that one just now 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.