MEL を使用してタイムライン上の位置をどのように取得または設定できますか?

 
 
 

現在のタイムは、currentTime コマンドを使用して設定することができます。

currentTime コマンドを照会して現在のタイムを返すことができます。現在のタイムの書式は、currentUnit コマンドで制御されます。

次のコマンドを実行すると、$time 変数に現在のタイムが秒単位で格納されます。

// Save the current time unit in a variable
string $timeFormat = `currentUnit -query -time`;
// Set the current time unit to seconds
currentUnit -time sec;
// Store the current time in $time
float $time = `currentTime -q`;
// Restore the original time unit we saved earlier
currentUnit -time $timeFormat;