Skip to main content

Asset Array

Intro

Create a list of assets that can be assigned to other Shapes via their indices.

UI

Auto Index - When checked, the layer will automatically output all indices.

Index - The index to be used from the Assets list.

Reverse - Invert the order the indices are output in. For example, where there are 3 indices 0,1,2, their order will be reversed to 2,1,0.

Count - Output the number of indices in the array.

Add - Use this button to add more rows (indices) to the UI.

0: Asset - The first index in the array. Connect or drag an Asset or Assets (.svg/ .csv/ .png etc) into this attribute.

Example
  1. Drag 2 .png files from Finder/Explorer into the Assets Window.
  2. Right click on the Group that was created on import containing the .png files and choose Create Array from Group. This will create an Asset Array with 2 indices and a .png file connected to each one.
  3. Create a Rectangle.
  4. Open the Fill tab.
  5. Right click on the Shaders attribute and select **Add Shader > Image Shader.
  6. Connect the Asset Array to the Image slot on the Image Shader.
  7. Select the Rectangle in the Scene Window and click on the Duplicator icon in the Shelf.

This will create a grid of 9 rectangles each with alternating images. If you wanted to randomise this sequence you could add a Random Behaviour with a Minimum of 0 and Maximum of 1 and connect it to the Index of the Asset Array.

info

See the Dynamic Rendering section for some examples of how this layer can be put to good use.

Double click to set Index

Double clicking on a indices' row will set the Index to that value.