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?

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
}
  • 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? – user6262902 Apr 16 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 at 21:39

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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