Jump to content

Custom struct as attribute


DASD

Recommended Posts

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...