MEL How-To #45 | ||
| ||
How do I toggle playback between "Normal" and "Free" while playback is running? It only seems to take effect when I restart playback at the beginning.The trick is to stop and restart the playback within the MEL that toggles the Playback Option: // Is the animation currently playing? int $isPlaying = `play -q -state`; // If so, stop. if ( $isPlaying ) play -state off; // Toggle playback mode between "Free" and "Normal" playbackOptions -ps ( !`playbackOptions -q -ps` ); // If the animation was playing, resume playing with new mode if ( $isPlaying ) play -state on; Related How-To's | ||
Copyright ©2005 by Bryan Ewert, maya@ewertb.com Maya is a Registered Trademark of Alias |