MaxScript输出所选对象在每一帧中的速率以及平均速率到一个文件
来源:互联网 发布:网络呼叫系统有哪些 编辑:程序博客网 时间:2024/06/11 01:34
How To ... Output Object Data To File
macroScript SpeedSheet category:"HowTo"
(
if selection.count > 0 then
(
output_name = getSaveFileName caption:"SpeedSheet File" types:"SpeedSheet (*.ssh)|*.ssh|All Files (*.*)|*.*|"
if output_name != undefined then
(
output_file = createfile output_name
at time animationrange.start format "Object(s): %/n" (selection as array) to:output_file
average_speed = 0 --平均速度
for t = animationrange.start to animationrange.end do
(
at time t current_pos = selection.center
at time (t-1f) last_pos = selection.center
frame_speed = (distance current_pos last_pos)*FrameRate --帧速
average_speed += frame_speed
format "Frame %: %/n" t frame_speed to:output_file
)
average_speed /= (animationrange.end-animationrange.start)
format "Average Speed: %/n" average_speed to:output_file
close output_file
edit output_name
)--end if
)--end if
)--end macroScript
运行结果:
==================================
animationrange 默认为100帧
FrameRate 帧速率 这里是30
有一行代码让我思索好久,最后恍然大悟
frame_speed = (distance current_pos last_pos)*FrameRate
一直想为什么乘呢?
原来1秒有30帧
- MaxScript输出所选对象在每一帧中的速率以及平均速率到一个文件
- 全双工和半双工模式在网卡中的区别以及修改网卡速率
- 在安卓机上测试内联汇编和直接写成.s文件以及C语言的速率比较
- Scrum中的团队速率
- 获取文件下载速率
- 整理STM32GPIO输出速率问题
- 计算帧速率
- HelloWorld帧速率
- 我国平均3G速率尚不到日韩等国家3G平均速率的十分之一
- MaxScript——将所选的对象放到一个数组内
- 无线局域网中的速率控制
- NS2中的多速率MAC
- gnuradio 数据速率和输出的问题
- OpenGL系统设计-帧速率
- OTN学习笔记-帧速率
- WCDMA中码片速率、符号速率、bit速率
- PAIP.测试硬盘的成色以及速率
- 文件拷贝过程中使用文件流、缓冲流、转换流以及速率比较
- 幸福的十个关键词
- php soap curl rpc 比较(转自http://www.jkqq.net/space.php?uid=27903&do=blog&id=8280)
- linux2.6内核ppp分析
- 第三章:堆栈
- Beanshell 调用自己的方法
- MaxScript输出所选对象在每一帧中的速率以及平均速率到一个文件
- 面试时薪资谈低了怎么办?
- P2P之UDP穿透NAT的原理与实现 [转] 收藏
- 如何在wince下实现一个文件系统驱动
- 其实
- 公司搬家整理中
- wince文件系统函数的调用过程
- 参加了visual studio 2010发布会
- wince如何通知设备已经mount