Name of main transform node

   2283   3   1
User Avatar
Member
214 posts
Joined: Oct. 2008
Offline
I am buried deep within a subnet. I would like to get the name of the main transform node on /obj level for the node using hscript. How can I do this?

I am using the origin() expression to get the position of one object relative to my main object, which is why I need to know the name of my transform node. This will be part of an otl, so I can't just type the name of the node in or assume the user might not bury the asset further in subnetworks.
User Avatar
Member
861 posts
Joined: Oct. 2008
Offline
opfullpath(“.”) will give you the full path, so you could probably extract the node name from that and use it to get your node's transform.

It's not perfect but perhaps it helps a little.
--
Jobless
User Avatar
Member
861 posts
Joined: Oct. 2008
Offline
Well, I messed about a bit and perhaps this will help further…

You can get the object's name with the attributeStringEdit node. If you first create a string attribute with value `opfullpath(“.”)` and then use:

From: /obj/*/*
to: *

that seems to give you the node's name.



Edit: The following expression will do the same:

pythonexprs(“hou.node('.').creator()”)
Edited by - Dec. 29, 2010 01:36:19
--
Jobless
User Avatar
Member
214 posts
Joined: Oct. 2008
Offline
Thanks!

I may come back with a couple more questions. Need a couple days to play around with this…
  • Quick Links