Source Filmmaker

Source Filmmaker

98 个评价
KeyFrame Mover
   
奖励
收藏
已收藏
取消收藏
Universe: Original IP
Script
标签: SFM
文件大小
发表于
更新日期
11.445 KB
2017 年 6 月 7 日 上午 8:27
2017 年 6 月 8 日 下午 1:13
2 项改动说明 ( 查看 )

订阅以下载
KeyFrame Mover

描述
This is an experimental script that creates a shortcut within SFM that selects key frames to the right of the mouse and shifts them over either a frame forward or back. The main use for this is to help with timing on frames.
This video above should explain it better.




How to install

  1. download this zip file: https://www.dropbox.com/s/aucsjqunxu1ryvj/keyframemover.zip?dl=1

  2. extract the files cv2.pyd, mousemacro.py, numpy and numpy-1.10.1.dist-info to "SourceFilmmaker\game\sdktools\python\global\lib\site-packages\"

  3. extract the two images to "SourceFilmmaker\game\platform\scripts\sfm\"

  4. next if you want it run at start up run "add keyframe mover at startup" under the script menu

  5. it should work now the next time SFM starts be sure to check the console or script editor for errors.

  6. if you just want to try it then run "keyframemover" under the script menu it will add the hotkeys to sfm right then

How to use

This script has three keyboard shortcuts keys, which can be change at end of the script file.
do make sure when you use it to zoom to a level where there is some space between the keys.
  1. shift forward ' . ' -> all bookmark keys on screen and to the right of the mouse will get selected and shift over a frame to the right, or any already selected frames will shift

  2. shift back ' , ' -> all bookmark keys on screen and to the right of the mouse will get selected and shift over a frame to the left, or any already selected frames will shift

  3. re-scale ' / ' -> this one controls how far in pixels the keys move. use this after changing zoom level to get smoother shifts.


How this script works

This script uses the OpenCV library in order to work

first it takes a screenshot of the window
then it uses a template img to find all the bookmarks on screen and records each one positions to the right of the mouse. from there the script moves the mouse to each key selecting it then just uses middle click to drag the keys over.
There is a simpler way to do this in sfm without the image scaning but due to an unfixed bug, SFM will crash if you do it within a GUI.



feel free to modify the script for your own use
if you find any bugs or have suggestions message me in the comments below

Includes:
sfm\mainmenu\keyframe mover\add keyframe mover at startup.py
sfm\mainmenu\keyframe mover\keyframemover.py
18 条留言
HarveySFMAnimations 4 月 15 日 上午 1:15 
you don't even need this, just hold ctrl and select the keys you want to move. no hate but this is kinda useless when you figure this out
BIney 2020 年 5 月 26 日 下午 11:52 
This doesn't seem to work anymore.
I followed the instructions but the hot key doesn't work. I checked that there were no errors in the console window.
MrXBX 2017 年 7 月 10 日 上午 12:33 
A script idea I had is one for the Graph Editor that: with selected keyframes, to shrink and expand the time between them by something like the mouse scroll wheel?
GottoGure 2017 年 6 月 9 日 下午 5:41 
After i watch video and read comment about this script i totally love it i mean we don't have to waste more time to remove freame by frame manualy just tab hot key and we good to go XD
OMG Theres A Bear In My Oatmeal!  [作者] 2017 年 6 月 8 日 下午 1:16 
@Ze-Richtofen , yes, but this script just does it with a hotkey instead of clicking around.
OMG Theres A Bear In My Oatmeal!  [作者] 2017 年 6 月 8 日 下午 1:07 
@ConfederateJoe, when you start up sfm open up the script editor its under "windows" on the menu bar. it should say "KeyFrameMover initial startup complete". if thats fine then try the hotkeys in the graph editor with some keyframes. then check the script editor any errors.
ConfederateJoe 2017 年 6 月 8 日 下午 12:56 
The hotkeys don't seem to work. I'm not sure i got the scrip running. Step 5 confuses me.
Ze-Richtofen 2017 年 6 月 8 日 下午 12:14 
Can't you just shift click that frame to the right to the final frame and do the same thing?
OMG Theres A Bear In My Oatmeal!  [作者] 2017 年 6 月 8 日 上午 11:32 
@ConfederateJoe, after doing steps 4 and 5 you use the keyboard shortcuts to execute the script
ConfederateJoe 2017 年 6 月 8 日 上午 11:19 
Well I can't seem to run the script. I put things in the right folders and now I'm not sure how to execute.