Atom Posted October 8, 2017 Share Posted October 8, 2017 (edited) 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 October 9, 2017 by Atom Quote Link to comment Share on other sites More sharing options...
f1480187 Posted October 9, 2017 Share Posted October 9, 2017 Hard to tell without a scene, but the Wrangle need to be unlocked to set parameter reference to "Outer Code" on Snippet VOP. The code seems good for me. Quote Link to comment Share on other sites More sharing options...
Atom Posted October 9, 2017 Author Share Posted October 9, 2017 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? ap_vex_struct.hiplc Quote Link to comment Share on other sites More sharing options...
f1480187 Posted October 9, 2017 Share Posted October 9, 2017 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: Simple! 1 Quote Link to comment Share on other sites More sharing options...
Atom Posted October 9, 2017 Author Share Posted October 9, 2017 Thanks for the info. Arrays of struct also seems to work as well! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.