-- 看着这个很专业
try(GT_script_path_work (getSourceFileName()))catch()
struct outfile
(
output_name,
fn p =
(
output_name = getSaveFileName caption:"SpeedSheet File" types:"SpeedSheet (*.ssh)|*.ssh|All Files (*.*)|*.*|"
if output_name != undefined then
(
-- 数据之间做输出写出来
--print (output_name +"!!!!!!!!!111" )
output_file = createfile output_name
---创建了文件
at time animationRange. start format "Object(s): % \n" (selection as Array ) to: output_file
---- 没有问题已经成功的输入。
average_speed = 0 ;
for i in animationRange. start to animationRange. end do
(
--- 用时间条上的东西进行输出操作,这个也是非常好用的。、
at time i current_pos = selection. Center
at time (i-1f) last_pos = selection. Center
--- 帧速率
frame_speed = (distance current_pos last_pos ) * frameRate --- 这个就是帧速率
average_speed += frame_speed ;
format "Frame % : % \n " i frame_speed to: output_file
)
close output_file ;
edit output_name ------ 用这个的方法 输入之后再进行查看是和不错得方法。
)
)
)
o = outfile output_name:"" --- 在开始定义的时候就要把数据类型定义好, 这个很重要。
o.output_name = o.p()