Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Magnus Pettersson

Change Node Shape in H16

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

 

1 person likes this

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