Jump to content

[SOLVED]VEX Struct Does Not Work?


Recommended Posts

Hi All,

I have a struct defined in the outer code area of an attribute wrangle.

When I try to reference the struct, the node errors out.

What is the syntax for using structs?



If I comment out the code that tries to reference the struct I get no error, which indicates to me that the struct itself is defined correctly.


Edited by Atom
Link to comment
Share on other sites

Thanks for the reply. I had never actually dived inside a wrangle.

I don't really know the correct way to setup the Outer Code values. I found an example already posted that I was trying to manipulate but here is a new HIP file with the Outer Code field from the VOP copied to the top level.

Is that all there is to is? Or is there more that needs to be setup?


Link to comment
Share on other sites

You mistyped type name in your scene (relatePoint vs relatedPoint). It should work once you fix it, and you don't need extra parameter if you enter outer code directly in Snippet's field.

Houdini doesn't treat this overall thing in any special way. Outer code is a field on Snippet VOP. You can't edit it unless you unlock the Wrangle. Once you unlocked, you can add your structs, array-returning functions, etc. For convenience, you can create similar spare parameter on Wrangle node and reference it same way the Code field is referenced:



  • Like 1
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.

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...