I am trying to scatter inside a foreach loop. I am passing the geometry to scatter on in pieces using partition and rule is based on an attribute. In each loop I change the density attribute used by the scatter node, based on the foreach iteration and reference an attribute array on the points being used to scatter on.
Don't use a foreach for this. Use a single density attribute on your chunks that varies in the desired way, and scatter all at once, using the density from attribute option on the scatter sop.
@jsmack - I want to use a foreach loop to effectively do what you are saying but on several different density attributes. The asset has a data driven UI so the end-user can decide how many different scattering densities and their relationships. Trying to cater to all this in one density attribute is too chaotic in the results. But thank you for the suggestion.
@Nima Thanks that example showed me my piece context was wrong, points (DOH) in stead of primitive.
@ndickson - thank you for showing me about the code block, you saved by brackets
This was my first post here, thank you for being so gentle