Jump to content
Sign in to follow this  
DASD

Custom struct as attribute

Recommended Posts

Posted (edited)

I have a custom struct in VEX (Houdini 16.5). It's nothing special, just a few simple values combined (no arrays). 

Is it possible to create an attribute out of a custom Struct in vex? Is it possible to do that for an array of custom structs?

I guess it's something like:
adddetailattrib(0,"name","myStruct");

adddetailattrib(0,"name","myStruct[]");

setdetailattrib(0,"name",myStructObject,"set");

These kinda seem to succeed in creating an attribute, but I don't seem to be able to add values to those.

Also I would like to be able to use the @ syntax for quickly defining attributes for custom structs. (Something like: myStruct@myAttribute;) Is that possible?

(Note that I can create variables, with code like: myStruct myVariable = myStruct(1,2,3); and myStruct myArrayVariable[]; But I specifically am interested in creating attributes on the geometry that would persist between wrangle nodes and especially be visible in the geometry spreadsheet.)

 

 

 

Edited by DASD

Share this post


Link to post
Share on other sites

it is not possible to create an attribute of a custom type defined by struct

  • Thanks 1

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  

×