移動先: 概要 戻り値 MEL 例.

概要

localizedPanelLabel( string $englishPanelLabel )

ローカライズした環境で Maya を実行すると、パネルとレイアウトの名前もローカライズされ、英語の名前に依存するスクリプトの動作が変わることがあります。 このプロシージャは、「上面ビュー(Top View)」や「パース ビュー(Persp View)」などのパネル ラベル、「アウトライナ(Outliner)」や「グラフ エディタ(Graph Editor)」などのウィンドウ名、と「パース ビュー/アウトライナ(Persp/Outliner)」や「3 ペイン(上下)(Three Panes Stacked)」などの構成/レイアウト名のローカライズ バージョンを使用するために使用します。

戻り値

なし

MEL 例

		// This command returns a non-null result when running in English.
		//
 		$panel = `getPanel -withLabel "Graph Editor"`;
		// Result: graphEditor1 //

		// But the same command returns a null result when running in another language.
		//
		$panel = `getPanel -withLabel "Graph Editor"`;
 		// Result: // 

		// In order to find the graphEditor panel by its label, "getPanel -withLabel"
		// must be passed the name of the Graph Editor in the localized language.  But
		// hard-coding the localized name for one language means the script will fail 
		// for other localizations, so one way to guarantee consistent script behaviour
		// across languages is to use localizedPanelLabel().
		// 
		$panel = `getPanel -withLabel (localizedPanelLabel("Graph Editor"))`;
		// Result: graphEditor1 //