一半君的总结纸

听话只听一半君

#45 如何在动画播放中切换 “Normal” 和 “Free” 模式? 看起来好像只能从头开始播放动画,切换才能生效.

解决方法是在切换Playback Option的MEL本身里停止和重新开始播放动画 : ( lz一直没看懂这有啥意义)

// 动画现在正在播放中吗?
int $isPlaying = `play -q -state`;

// 如果是的,那么停止播放.
if ( $isPlaying )
  play -state off;

// 切换 playback mode, "Free" 或者 "Normal"
playbackOptions -ps ( !`playbackOptions -q -ps` );

// 如果切换之前正在播放动画, 那么使用新的模式恢复播放
if ( $isPlaying )
  play -state on;

Related How-To’s

Monday, October 23, 2000

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: