Sorcar icon indicating copy to clipboard operation
Sorcar copied to clipboard

[REQUEST] Loop on Arrays?

Open MasterJames opened this issue 4 years ago • 0 comments

I am unable to loop on the elements that an array outputs. Let's imagine randomizing the red components of the material of an array of cubes, or even the rotation for that mater. How to?

I think if the Array generators output an array as well as an object then you would be able to process the loops on that.

Alternatively there would be a node called "elements from object" that can extract the duplicated objects from an array.

First and only thing I tried to do with Sorcar. Just randomize the colors of an array of cubes.

Anyway it's where I started. So bad first day trying a much needed soon to be great tool (love the Houdini reference coming to Blender idea BTW).

I would think there are more fundamental things that could achieve this for setting the property of anything like the color components of a material. It would appear there should be a 'color' property like 'number', or again a way to set a property on a value like color 'r', 'g', 'b' of a color or whatever it is, so maybe I am looking for a script node within loops.

Anyway I could not get the elements that an array generates in the loops, just a single object from the array, so it needs an 'array of elements' output that works in loops. Problem there is I would need all the separated elements when chaining them together (unless there was a compound array) so an array (is a line of cubes) in another array (2D grid of cubes), passed through a third array (3D cube of cubes), should return all the elements not just the last array of 2D grids, so you can process each cube in a loop.

Sorry I think this is maybe too new to post questions in some other forum if there is a way please point me to where it would be better to ask this and other possible noob questions that have answers although it is clearly not a simple one if it does exists. Still this is a way to make it simpler to get started with this surely to be great tool.

Thanks for working on it past, present, and future.

MasterJames avatar Jun 11 '20 10:06 MasterJames