Jump to content
Valent

want to store an attribute for some objects in 'foreach' loop

Recommended Posts

Hi, I'm trying to store a size of some objects into an array using 'foreach loop'. And it works in a single pass mode,  but not in normal mode. And I have no idea  why

Try to switch single pass mode on and off and check attributes on detail

stacked_boxes_q.hipnc

Share this post


Link to post
Share on other sites

I think the problem here is that the values in the array gets overwritten by the insert function somehow. As the documentation says "the function will fill the gaps with uninitialized values (for example, or the empty string)".

Building it that way, at the moment I have no idea how to solve it. Even using the push function and adding elements to the array, doesn't work. Maybe you can store the height as prim/point attribute and add them later to the array?

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

×