Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects scripting animation

  • scripting animation

    Posted by Alexis Martinez on April 22, 2005 at 2:04 pm

    hello,
    I’m working on a script which put keyframes at specific times.
    It works with “position” and “scale” properties, but it creates only one keyframe (the first) for the “rotation” property…
    Here is the concerned part of the script:

    […]
    valeurRotation = mySolid.property(“rotation”);
    valeurRotation.setValueAtTime(0,[953,953,953]);
    valeurRotation.setValueAtTime(2,[720,10,10]); –> doesn’t work (only one keyframe is created)
    […]

    Here is the same script with “scale” property (it works perfectly and creates 2 keyframes):

    […]
    valeurEchelle = mySolid.property(“scale”);
    valeurEchelle.setValueAtTime(0,[953,953,953]);
    valeurEchelle.setValueAtTime(2,[720,10,10]);
    […]

    so… any idea on what’s wrong ? (I’m working on AE 6.5)
    thanks,
    _____________
    Alex Martinez

    Alexis Martinez replied 21 years, 4 months ago 3 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    April 22, 2005 at 3:30 pm

    It doesn’t work because rotation is a 1-dimensional property and you’re trying to stuff an array in there (which will work for positon and scale). Change your last two lines to something like this and it should work:

    valeurRotation.setValueAtTime(0,100);
    valeurRotation.setValueAtTime(2,200);

    Dan

  • Alexis Martinez

    April 22, 2005 at 4:08 pm

    Hi Dan,
    It works for a 2D layer, but I’m working on 3D layers. So, how can I create keyframes on “rotation” property on a 3D-layer using an array ?
    ____
    Alex

  • Mylenium

    April 22, 2005 at 5:46 pm

    Only orientation will accept arrays, normal rotation is split to separate channels so you will need to use rotationX, rotationY and rotationZ and create separate values for them.

    Mylenium

    [Pour Myl

  • Alexis Martinez

    April 23, 2005 at 9:43 am

    Hi Mylenium,
    I have created values for each channel, and it works now.
    Thanks a lot 😉
    ____
    Alex

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy