Pixel Composer

Pixel Composer

Looping an array issue?
I'm not really sure if this is a bug or if I'm misunderstanding how loops and arrays work, but this is my setup:
Inside the loop
https://i.imgur.com/7KCMNHo.png
Result
https://i.imgur.com/fg26B4m.png

As you can see, the loop is generating an array with the correct size, but only the last position of the array contains a surface.
Last edited by LeoninoMalino; 25 Mar, 2023 @ 5:03pm
< >
Showing 1-2 of 2 comments
MakhamDev  [developer] 27 Mar, 2023 @ 5:40am 
I think the node you're looking for is array loop not normal loop. Normal loop will "loop" back the output to be used as input multiple times. If you want to process each value in an array, you should use array loop.
LeoninoMalino 27 Mar, 2023 @ 12:57pm 
Normal loop will "loop" back the output to be used as input multiple times.
I know, that's why I was adding the resulting surface on the array, then returning the array so it can loop on it several times.

If you want to process each value in an array, you should use array loop.
I managed to make it work with the Array loop, but I expected both methods to be valid. Also, what I don't like about this method, is that I have to "preload" the array, resizing it to the desired size (even if each entry is empty).

I strongly feel this approach should work, and if it cannot work because of limitations, there should be a restriction not allowing you to do it: be it not outputting an array, or not being able to use array operators inside the loop.
< >
Showing 1-2 of 2 comments
Per page: 1530 50