Jump to content
davidyannick

Filecache with attribute name

Recommended Posts

I'd like to put my name attribute (prim atribute) in the Geometrey filename  (ie : @name.bgeo.sc ....) of file cache or rop geometry, do you have any suggestion please ?

Thanks

Capture d’écran 2022-03-25 172421.png

Share this post


Link to post
Share on other sites

To fetch an attribute from geometry in HSCRIPT, you can use the various point(), prim(), detail() functions.
Note that the syntax is different from their VEX counterparts.
Also, and this is important for you, you need to use a different function for string attributes. points(), prims(), details(). (it reads as : point string, prim string, detail string)

So, for you, this would be the code

`prims(0, 0, "name")`.bgeo.sc // primString(input 0, primitive 0, attribute "name")

 

Share this post


Link to post
Share on other sites
On 26/03/2022 at 6:40 PM, Alain2131 said:

To fetch an attribute from geometry in HSCRIPT, you can use the various point(), prim(), detail() functions.
Note that the syntax is different from their VEX counterparts.
Also, and this is important for you, you need to use a different function for string attributes. points(), prims(), details(). (it reads as : point string, prim string, detail string)

So, for you, this would be the code


`prims(0, 0, "name")`.bgeo.sc // primString(input 0, primitive 0, attribute "name")

 

ok thanks for your help :)

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

×