Keyframe Display Issue

Keyframe Display Issue

Anonymous
Not applicable
1,364 Views
5 Replies
Message 1 of 6

Keyframe Display Issue

Anonymous
Not applicable

Hi, How do I make the keyframes to show on the actual frame? It seems they are all over the place, I need them placed exactly on the the number, now it shows as if there are in between half frames etc which makes it very difficult to move or select. Do I need to change something in the settings? Please advice.

 

de.png

Accepted solutions (1)
1,365 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable

Also to mention that the issue originates from the fact that somewhere along the project I accidentally converted the scene from 24fps to 30fps without keeping the frames at position, and now I have all these in between frames which I cannot control and its very frustrating. Is there a way to get the frames back to normal, please help. Thank You

0 Likes
Message 3 of 6

hamsterHamster
Advisor
Advisor
Accepted solution

What comes to mind is either you move all the keyframes in the GraphEditor/DopeSheet sideways forth-back with the TimeSnap option enabled, and correct some keys that jumped to the same frame (the animation slightly alters ) OR do Edit>Keys>Bake Simulation (you'll have the same animation with bunch of keys and those decimal frame keys, which you can partially fix with SmartBake). Both ways involve the manual intervention.


,,,_°(O__O)°_,,,
Maya2019.1 @ Windows10 & GeForce GTX1080Ti

If the post was helpful, click the
 ACCEPT SOLUTION  button, so others might find it much more easily.

0 Likes
Message 4 of 6

Anonymous
Not applicable

Hi and thank you for your reply, what you proposed works but as you said will require manual work, I found this script which I think does the job as it moves the keyframes to whole frames.

 

{ // get all selected anim curves or anim curves attached to the selection string $animCurves[] = `keyframe -q -name`; for ($animCurve in $animCurves) // browse them { // get all selected keys at this curve float $thisKeys[] = `keyframe -q -sl $animCurve`; if (!size($thisKeys)) // if no keys selected get all keys $thisKeys = `keyframe -q $animCurve`; for ($keys in $thisKeys) // browse the keys { if (`fmod $keys 1` != 0) // if the keys have decimal places move them to the rounded keytime keyframe -e -t $keys -iub true -a -o over -timeChange (floor($keys)) $animCurve; } } }

Message 5 of 6

hamsterHamster
Advisor
Advisor

Ok, as I read from code, it moves all keys backwards, even those that are .99, so you will have a slight animation change. It is the same as I described in the first method, you still need to select animcurves.

Later today I might rewrite this script so it moves keys to the nearest frame.


,,,_°(O__O)°_,,,
Maya2019.1 @ Windows10 & GeForce GTX1080Ti

If the post was helpful, click the
 ACCEPT SOLUTION  button, so others might find it much more easily.

0 Likes
Message 6 of 6

hamsterHamster
Advisor
Advisor

This makes the key approximation more precise.

 

// The script rounds the key times of selected curves/keys to a nearest integer frame.
// get all selected anim curves or anim curves attached to the selection
string $animCurves[] = `keyframe -q -name`;
for ($animCurve in $animCurves) // browse them
    { // get all selected keys at this curve
    float $thisKeys[] = `keyframe -q -sl $animCurve`;
    if (!size($thisKeys)) // if no keys selected get all keys
        $thisKeys = `keyframe -q $animCurve`;
    for ($keys in $thisKeys) // browse the keys
        {
        if (`fmod $keys 1` != 0) // if the keys have decimal places move them to the rounded keytime
            {
            if (`fmod $keys 1` <= 0.5)
                keyframe -e -t $keys -iub true -a -o over -timeChange (floor($keys)) $animCurve;
            else keyframe -e -t $keys -iub true -a -o over -timeChange (ceil($keys)) $animCurve;
        }
    }
}

 

Have fun


,,,_°(O__O)°_,,,
Maya2019.1 @ Windows10 & GeForce GTX1080Ti

If the post was helpful, click the
 ACCEPT SOLUTION  button, so others might find it much more easily.

0 Likes