Jump to content
Magnus Pettersson

Change Node Shape in H16

Recommended Posts

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

Share this post


Link to post
Share on other sites

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") 

 

Share this post


Link to post
Share on other sites

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

 

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×