Jump to content
afx

Get the name of your obj geometry object

Recommended Posts

Need to get the name of my geometry object in sops. So I can source that name and name my caches accordingly. Is there a small snipit anyone has off hand. 

Share this post


Link to post
Share on other sites
18 minutes ago, woodenduck said:

opname("..")

Dont see this expression, I had to do an opfullpath() and then a split(). 

Share this post


Link to post
Share on other sites

Where exactly are you entering the expression? Specific sop parameter. 

Share this post


Link to post
Share on other sites
Posted (edited)

$OS will grab the current nodes name in SOPs, I needed the level above that in the obj context. I am doing this in a attribute wrangle node in sops.

This worked

string path=opfullpath("..");
string pathSplit[] = split(path, "/");
s@objPath=pathSplit[1];

 

Edited by afx

Share this post


Link to post
Share on other sites

Ah, yes. If you have to use VEX, that's a solution. 

An attribcreate set to string with "objPath" in the name parameter, and opname("..") in the string parameter ,will get you the same result. 

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

×