Kewl's picture

I want to sort a list of layers before render (because of "layers are placed on top of each other in the order listed, with the first layer on the bottom and the last layer on the top"), but I don't see how that would be possible. The only thing I thought of for getting closer to my goal is using the name field of the layers to put in real values as names, but I don't see how to use that data afterwards to sort the layers list.

Any ideas?

Comments

Mmm right now I can't think

Bodysoulspirit's picture
Submitted by

Mmm right now I can't think of an easy solution either.

But based on what do you want to order the layers ? Can you say a little more or show the composition ?
From your description (first on bottom and last on top) one could wanna think you just wanna reverse the list ? If yes there is reverse list that would work.

Another solution would have been to use the Make Dictionary and Get Items from Dictionary nodes with a custom number list, but those nodes only accept text as inputs. Which leads me to a question to the Vuo team, would it be much work to allow Make Dictionary to work with any kind of values ? Or should we create a feature request for it if possible but more work ?

Thanks

In the composition, the

Kewl's picture
Submitted by

In the composition, the layers are created from amplitude data. I want that data to accompany the layers (so far by using the layer's name field) so I can sort the layers afterwards according to the amplitude data, before their rendering.

It's possible to sort the

Kewl's picture
Submitted by

Thanks for the input.

It's possible to sort the data before turning the data into layers, but once it's a list of layers, sorting is not possible anymore: the list can be reversed or shuffled, but not sorted. If sorting a list a layers was possible, the layer's scale data could be used (or rotation, or translation) for the sorting.

But, ultimately, I would need the list of layers to have more the one "column" so each layer (column 1) could be accompanied by other data (column 2, column 3, etc). The data in column 2 or column 3, etc, could be used to sort the layers.

Which leads me to a question

jstrecker's picture
Submitted by

Which leads me to a question to the Vuo team, would it be much work to allow Make Dictionary to work with any kind of values ?

I think Editor support for dictionaries (lists of key/value pairs) is meant to cover that. We got dictionaries working just enough for the few nodes that use them, like Calculate, but it would be better if they worked with all data types.