Jump to content
Sign in to follow this  
Doum

Node name with python or Hscript

Recommended Posts

Hey,

Is there a way to use code(python or hscript like opname() ) in the naming of a nodes?

thanks

Share this post


Link to post
Share on other sites

Sure,

with python, for example:

n = hou.node('/obj/geo1')

n.setName('my_new_name')

If you use the python shell, you can drag a node into the window to get the path to it.

In the example I set n because on the next line in the shell, after typing n[dot] you will get a list of methods that are available.

you could also just type:

hou.node('/obj/geo1').setName('my_new_name')

but you wont get the helpful list of methods...

Share this post


Link to post
Share on other sites

Thanks for the help! I'm not in front of houdini right now and i'm curious to know if it is possible to write that expression in the place where we name the node so we can reference the name with something else like a channel or another node?

Thanks

Doum

  • Like 1

Share this post


Link to post
Share on other sites
On 7/12/2013 at 5:21 PM, Doum said:

Thanks for the help! I'm not in front of houdini right now and i'm curious to know if it is possible to write that expression in the place where we name the node so we can reference the name with something else like a channel or another node?

Thanks

Doum

I'd like to be able to do something like this as well.

Edited by LukeLetellier

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
Sign in to follow this  

×