0

Is there a way to control whether or not an animation preset it applied to an item programmatically through After Effects?

  1. Let's say, for example, I have some sample text, that just says "hello world".
  2. I then go and drag & drop a "slide & swoop" onto the hello world text.
  3. I then add another transition, say a 'slide straight' from the effects & presets
  4. I then want to add a 'slider' control to the essential graphics panel, so if slider is set 0, none of the effects are applied. If it is to 1, it applies animation effect #1, and if it is set to to 2, it shows animation #2?

1 Answer 1

0

Yes, that's perfectly possible, though it might be more work than just doing the animation yourself.

You'll have to find all of the changes that the presets apply to the layer and adapt them with expressions that respond to the value of the slider. To find all of the changed properties of a layer use uu (double tap the u key). You'll have to apply preset 1, find all of the changes it makes, and write an expression that mimics them, then revert the layer and apply preset 2 and do the same thing. Then in your expression for each changed property you'd have:

var ctrl = effect("Slider Control")("Slider");
if (ctrl === 0){
    value; //use the current value of the property
} else if( ctrl === 1){
    // the expression that mimics preset 1
} else {
    // the expression that mimics preset2
}
2
  • hmm, I 'think' I understand what you are saying (I do programming, but new to 'adobe' programming)... you mean - there isn't just an easy way to say to use the, let's say "stretch wipe" preset, and just say if (ctrl == 1) {jump to preset 1} if (ctrl == 2) ... etc but rather, I'd have to figure out the coding/logic for each individual preset, and put that into my parantheses? Apr 16, 2018 at 14:50
  • Presents are a way of applying pre configured changes to properties, animation and effects, so they change different things. So yes, you'd have to reverse engineer the preset and use expressions for each parameter the preset affects
    – stib
    Apr 16, 2018 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.