ScriptSpot

Forum topic · Scripts Wanted

snap keyframes

By brit · 2013-10-11

Description

I want to be able to slide my keyframes on the timeslider and for them to snap to every 5 or 10 frames.

cheers

Comments (1)

animation snap

brit · 2013-11-24

This is what i have below, i am having problems moving the keyframe to the nearest 5th fr,.
at the moment this nudges the frame 5 frames which is another thing I want to keep., any help appreciated.
cheers

try(destroyDialog AnimSnap) catch()
rollout AnimSnap "Animated Snaps" width:162 height:171
(
--GUI
groupBox grp1 "Animaion Snaps" pos:[5,6] width:153 height:102
button btn5 "5th fr" pos:[14,65] width:33 height:23
label lbl1 "Snap selected keyframes to nearest:-" pos:[16,30] width:122 height:28

on btn5 pressed do
(

--selectKey if it is not a multiple of 5 move to nearest 5th frame
moveKeys $.pos.controller 5 #selection
moveKeys $.rotation.controller 5 #selection
moveKeys $.scale.controller 5 #selection

)
)
createDialog AnimSnap 162 120