5 Replies Latest reply on Jul 31, 2014 4:38 PM by zewt

    How to adjust multiple keyframe values accurately?

    zewt Level 1

      How can I precisely adjust a set of keyframes, eg. adding 10 to the X coordinate of all selected position keyframes?

       

      This is painful in the graph editor.  I have to zoom way in, and then carefully drag the group of keyframes up until I see a delta of "10".  I often end up actually moving it by 10.001.

       

      Parenting and unparenting isn't a solution, because I need to be able to do this for any keyframe, like expression sliders, not just transforms.

       

      I started to write a script for this, but I can't find any way to move a keyframe, other than deleting it, creating a new one and then carefully copying over the interpolation settings, which seems risky (if it loses keyframe information, I might not notice until much later).  I guess I could write a native plugin, but that's a lot more work.  This is pretty basic, so hopefully there's already a way to do this.

        • 1. Re: How to adjust multiple keyframe values accurately?
          Mylenium Most Valuable Participant

          Why would anyone? You simply scrub the numeric position field with multiple layers selected to get relative adjustments. Basics of AE.

           

          Mylenium

          • 2. Re: How to adjust multiple keyframe values accurately?
            zewt Level 1

            (A less condescending answer would be nice.)

             

            How do you add 1.85 by scrubbing?  It's imprecise.

            • 3. Re: How to adjust multiple keyframe values accurately?
              Rick Gerard Adobe Community Professional & MVP

              You can always select the value in the timeline then move the cursor to the end with the right arrow key and then type + 1.85

               

              Math functions work in most places where you can type in a value. For example:

              Screen Shot 2014-07-30 at 7.44.43 AM.png

              becomes

              Screen Shot 2014-07-30 at 7.44.53 AM.png

              You can also look at the info palette as you drag layers around with the tools, here I have changed the angle - 16.2 degrees

              Screen Shot 2014-07-30 at 7.47.15 AM.png

              You can see rotation, scale and position changes in the info palette, the top value is the current value, the second shows the change from the original.

               

              For precise dragging you can hold down the Cmnd/Ctrl key to increase accuracy by a factor of 10 or hold down the shift key to make the values increase 10 times as fast.

              • 4. Re: How to adjust multiple keyframe values accurately?
                Dave LaRonde Level 6

                To alter position, I'd just hightlight all the keyframes in question, park the timeline cursor on one of those keyframes, then use the left-right-up-down arrow keys.  Want multiples of ten?  Hold down the shift key as you hit the arrow key.  Then it becomes a simple mattter of counting.

                • 5. Re: How to adjust multiple keyframe values accurately?
                  zewt Level 1

                  Arrow keys only work with position, but I need a solution for any keyframe stream.  Entering equations into the numeric entry doesn't work when moving multiple keyframes, since it still sets every keyframe to that value.  If the value is 10 and you enter "10+20", it doesn't add 20 to every keyframe, it just sets every keyframe to 30.  It would be perfect if it let me type in "n+20", and then evaluated the expression for each keyframe to set its new value, but no such luck.

                   

                  As for number scrubbing, there are countless problems, even ignoring the lack of precision. You can't drag by just 1; it doesn't start changing until the cursor has moved a minimum distance, so it doesn't move at all and then suddenly jumps to +3.  (That's normal dragging behavior--it's so you don't accidentally drag when you're just trying to click--but it makes this interface hard to use.)  You also can't easily see the number you're changing (the mouse cursor is covering it!), and if you have an expression on the field you can't see the initial value at all, since it shows the result value until it sees a drag, not the source value.

                   

                  I wrote a script for this.  (The issue of changing keyframes was something else--you can change the value of keyframes from scripts, you just can't change their time.  Which is still a problem, but a separate one...)  If anyone wants it: [JavaScript] // Recursively find all keyframes in a property group.  function findKeyframes(p - Pastebin.com

                   

                  Examples:

                  - Select a bunch of position keyframes, run the script, and enter "n[0] += 50" to add 50 to the X position of all selected keyframes.

                  - Select slider control keyframes, and "n++" will increase them all by 1.

                  - Select scale keyframes, and "n[0] *= 2; n[1] *= 2; n[2] *= 2;" to double the scale of all of them.

                  - "n[0] = Math.round(n[0]); n[1] = Math.round(n[1]);" will snap selected keyframes to the nearest integer.

                  - Select rotation keyframes, and "n += 90" will add 90 degrees to all of them.

                  - Select checkbox keyframes, and n = !n will flip them all.