Hi,

a post with three question marks.

I wish to create a circle of layers, each one able to react to mouse passing over. I create the layer with a "build list" process, giving each layer a numbered name: 1, 2, 3....

When i "process list" the list to check for mouse position, i'd expect the attached composition work: but it doesn't, as seems that "process item" outputted by "process list" isn't converted to layer name when inputted to "is point within layer", as I'd expect. Why?

I tried a workaround, with a counter that increments at every cycle: from the attached composition, just attach the output pin of "count" orange node to "layer name" input of the orange "is point within layer" node. It works for all the layer but not for the last. Why?

Last: just the "scale" transition seems to work, when the mouse is on the layer, "translation" values are ignored. Why?

thanks

michele

Comments

The reason for this is that

MartinusMagneson's picture
Submitted by

The reason for this is that while the build list outputs an index number (which you use to name the object), the process list outputs a layer. So where build item will give you a number 1 - > ∞, process item will give you the layer info as a value. That means that after converting to a summary, instead of getting a text "1" ... "∞", you'll get a text "object named "1", ...". Since you don't have any layers named "object named..." it won't register any true conditions for any present layer.

There are multiple ways to solve this. The simplest perhaps is to put all of the functionality into the build list.

A different approach would be to generate lists for position and size, generate one oval layer, and do the size/movement with a copy layer node (perhaps a bit more efficient?).

Note that the movement change feedbacks its position making it glitch if the mouse is in an in-between old/new position as the moved layer has new bounds which would again move it outside the mouse area, moving it back to its false position, resizing it because of mouse position, move it outside the area and so on. This won't happen if the new position covers the old area as well (only moving it by the offset the new size generates).

Thankyou Magneson (

cremaschi's picture
Submitted by

Thankyou Magneson. You solution is clever and I never realized one could use the build list functionality that way.

For the record, I solved in less elegant way, but I attach here as could help anyway. First, I found errors in how I calculated Layer name with Count, and attached is the right way. Second, I created a "Get Layer Name" subcomp that simplify a lot the process. Attached is the solution and the node.

ciao michele