ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Move layer to where mouse is clicked

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Stefan Christopher
Move layer to where mouse is clicked
on Oct 27, 2016 at 10:35:57 am

Does anyone know of any scripts or keyboard shortcuts that would allow you to move a layer to where you click the mouse.

For example I often have to animate flashing lightbulbs on text. I do this by having a looping optical flares layer that is set to loop from a random point. Often for a word there will be upwards of 100 optical flares layers.

At the moment I have to manually move each one so that the centre of each one is over a lightbulb on the text.
This isn't difficult but it is rather time consuming, especially when you have to animate lots of different words.

So it would be really great if there was a way to just select the optical flares layer and then button press + mouse click over the centre of a lightbulb and the optical flares layer would jump to that position.

Does anyone know of a way to do this?


Return to posts index

Roei Tzoref
Re: Move layer to where mouse is clicked
on Oct 27, 2016 at 10:40:26 am

Try jump parenting: parent layer 1 to layer 2 while holding shift and layer 1 will jump
To layer 2 position.

Roei Tzoref
After Effects Artist & Instructor
♫ Ae Blues Tutorials


Return to posts index

Stefan Christopher
Re: Move layer to where mouse is clicked
on Oct 27, 2016 at 10:44:29 am

Thank you. That's a really useful technique to know but it doesn't help with this particular problem as you would still have to create layers over each lightbulb to then parent the optical flare layer to.


Return to posts index


Matthew Keane
Re: Move layer to where mouse is clicked
on Oct 27, 2016 at 12:32:44 pm

Do you really need hundreds of flare layers to be visible simultaneously? If the layers are not all visible at the same time, I'd look at animating the position of the flare layer and using Hold keyframes to stop it moving around between keyframes. If you need to fade in/out the flare loop, you could add opacity keyframes and repeat them with a LoopOut expression.

That way, for example, the flare could fade in/out once a second. By adding a new position keyframe every second, one layer could be used for several flares, appearing in different places. If you want more than one flare visible at a time, you would still need to duplicate the layer a few times, but certainly not hundreds of copies, and repositioning the layer would be as quick as dragging it around.


Return to posts index

Stefan Christopher
Re: Move layer to where mouse is clicked
on Oct 27, 2016 at 12:41:39 pm

That's fine too but really it's just overcomplicating things.
If you put one flare over every light bulb then you don't have to worry about animating anything or moving anything around. The flares just loop over and over with a random length pause between each loop.

You can then play the clip for as long as you need to without every having to worry about keyframing anything.

My original question was only if someone knew of a script or shortcut that would make it easier to place the flares into position in the first place.


Return to posts index

Michael Szalapski
Re: Move layer to where mouse is clicked
on Oct 27, 2016 at 3:03:23 pm

Optical Flares has an option to place flares based on luminance. Perhaps a typeface with dots on it would work or you could create text and then put dots on it with a paintbrush (in AE or Photoshop) and the flares would track to it.

- The Great Szalam
(The 'Great' stands for 'Not So Great, in fact, Extremely Humble')

No trees were harmed in the creation of this message, but several thousand electrons were mildly inconvenienced.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]