Jump to content
Sign in to follow this  
anicg

object merge name same as parent node name

Recommended Posts

I need the object merge to pick up the name of the parent obj node automatically

name.JPG

Share this post


Link to post
Share on other sites
Posted (edited)

Try this expression:

`opname("..")`

Edit: No, it"s wrong, this expression does not work in this field

Edit_2:

This is one of possible solutions: https://www.sidefx.com/docs/houdini17.5/hom/locations.html#node_event_files

You should create folder "sop" in your "$HOUDINI_USER_PREF_DIR/scripts" directory, and "object_merge_OnCreated.py" file in that folder:

n = kwargs["node"]
parent_name = n.parent().name()
n.setName(parent_name, unique_name=True)

This will be rename object merge node on creation with name of it parent object node. Disadvantage is that each new object merge node will be rename. Maybe there is more convenient way, i don't know.

Edited by vicvvsh

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  

×