Source Filmmaker

Source Filmmaker

203 个评价
[SFM-Script] Useful script to manipulate a camera's focal distance more easily
   
奖励
收藏
已收藏
取消收藏
Universe: Team Fortress
Script
标签: SFM
文件大小
发表于
11.046 KB
2014 年 9 月 3 日 下午 6:13
1 项改动说明 ( 查看 )

订阅以下载
[SFM-Script] Useful script to manipulate a camera's focal distance more easily

描述
As requested in this post (http://psteamcommunity.yuanyoumao.com/workshop/discussions/-1/540744937411842687/?appid=1840) we finally have a script that links the focal distance to a bone, so that you just have to position the bone onto the model you want to have a nice focus on.

To use it, install it by subscribing (duh), and then you just have to execute the script on a camera through the 'Rig' menu (RMB on a camera in the Animation Set Editor).

Made by Yandros.

Known bug : you may need to move the camera with the work camera (for instance, after executing the script or moving the camera through its viewport) in order for the data to be refreshed. You don't need to confirm the change, though.

The source code is pretty easy to understand ; if you are wondering about learning SFM Python scripting, why don't you give it a try ? ;)
Here, have a look : http://pastebin.com/bZWF6a3a
39 条留言
MyNamesRubber 7 月 23 日 上午 10:51 
A little aperture goes a long way it seems
Nero (ZMK) 2022 年 12 月 29 日 上午 11:47 
So, all it did was add the bone. No matter what I try, nothing happens. I've followed the instructions and read them several times over, so why isn't it working?
Señor Maracuyá  [作者] 2022 年 9 月 13 日 上午 11:55 
@famix oh that's interesting to hear! It does give a hint towards fixing the script. If we look at the pastebin in the description, on lines 46 and 47 we can see the code that ensures that moving the "bone" does trigger updates to the focal distance.
This means that maybe adding an extra similar lines to connect to the camera's own position could be the desired fix!
It's been a while since I've last touched SFM, so this may be more suitable for somebody other than me ^^'
NTFRMERTH 2022 年 9 月 12 日 下午 3:32 
It won't work properly for a moving camera. It will only keep focus for one frame and the rest bugs out
waterpleskalka 2022 年 8 月 20 日 下午 10:26 
"it`s requiem, all what you see is real"
Zа победу! 2020 年 3 月 1 日 下午 1:15 
Strange...it's working. Thx for the script!
Chicken Jockey 2018 年 2 月 14 日 下午 10:51 
It's broken. Not working at all.
bonbun 2017 年 9 月 5 日 上午 9:18 
well it messed up and now it won't let me remove the rig. thanks, i just ruined a great shot of my animation
Italian 2017 年 7 月 27 日 下午 9:18 
Tried using it and it bugged out and now the focal distance is who knows where
Ponyboy 2017 年 6 月 16 日 下午 8:50 
moving the cmera doesnt refresh anything. i tried it 10 times and the image remains a blurry mess.