MEL How-To #27 | ||
| ||
How do I query/set the Time Slider and Range Slider?To query the highlighted range of the Time Slider: global string $gPlayBackSlider; float $rangeArray[2]; $rangeArray = `timeControl -q -rangeArray $gPlayBackSlider`; // Result: 1 2 // To set the highlighted range of the Time Slider: As far as I know, you can't. My attempts to do so (at least with the ‘ global string $gPlayBackSlider; string $range = `timeControl -q -range $gPlayBackSlider`; // Result: "93:229" // timeControl -e -range $range $gPlayBackSlider; // Error: line 1: Too many arguments. Expected 1, found 2. // float $rangeArray[2] = `timeControl -q -rangeArray $gPlayBackSlider`; // Result: 93 229 // timeControl -e -rangeArray $rangeArray $gPlayBackSlider; // Error: line 1: Invalid object or value: // To query the Range Slider: float $minTime = `playbackOptions -q -minTime`; // Result: 1 // float $maxTime = `playbackOptions -q -maxTime`; // Result: 30 // To set the Range Slider: float $minTime = 12.0; float $maxTime = 18.5; playbackOptions -minTime $minTime -maxTime $maxTime; | ||
Copyright ©2005 by Bryan Ewert, maya@ewertb.com Maya is a Registered Trademark of Alias |