Compile block, Strange behavior. Any guidance.

   1510   2   0
User Avatar
Member
10 posts
Joined: July 2016
Offline
Hello,

I've started to use the “Compile Block” a lot now. But I've been having a problem with this asset I've put together.

The problem is the compiler return an incorrect result but correct when displayed with foreach node. Detail notes and colour coding nodes are in the scene file.

Nodes that are red work with the compile block but not the preferred method. Green Work with the “foreach” however, does not iterate right with the compile block but is also the desired branch I would like to use.

Sorry for vague detail I think once you view and try the network you'll understand.


Any guidance would be very appreciated.

Attachments:
barycentric_interpolation_problem.hipnc (834.7 KB)

User Avatar
Staff
6219 posts
Joined: July 2005
Offline
The Attribute Create node uses Hscript, not VEX, for its initial value. Thus the @sourceprim in that expression is effectively a local variable, so prohibited in a compiled SOP.

There is clearly a bug here, as it should red flag and point that out to you, not just silently fail!

But the work around is to just move the expression into your Group Expression node & simplify stuff in the process, as in the attached.

Attachments:
barycentric_interpolation_problem_fix.hipnc (840.1 KB)

User Avatar
Member
10 posts
Joined: July 2016
Offline
Thank you Jlait.
  • Quick Links