ジャンプ先: 概要. 注. 戻り値. フラグ. MEL 例.
rename [-ignoreShape] [-uuid]
[object] string
rename は、取り消し可能、照会不可能、および編集不可能です。
指定したオブジェクトが新しい名前に変更されます。引数を 1 つだけ指定すると、最初に選択したオブジェクトの名前が変更されます。新しい名前が既存の名前と同じ場合は、指定した名前に基づいて固有の名前がオブジェクトに付きます。オブジェクトの名前を空の文字列にすることはできません。トランスフォーム名を変更すると、そのトランスフォームの下にあるシェイプ ノードのうち、プリフィックスが古いトランスフォーム名と同じものは名前が変更されます。たとえば「rename nurbsSphere1 ball」では、「nurbsSphere1|nurbsSphereShape1」が「ball|ballShape」に変更されます。
新しい名前の最後に「#」を 1 つ付けると、名前の変更コマンドは、新しい名前を固有にする番号で最後の「#」を置き換えます。
string | 新しい名前。元に戻した場合、オリジナルの名前が返されます。 |
ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
---|---|---|---|---|
-ignoreShape(-is)
|
|
![]() |
||
|
||||
-uuid(-uid)
|
|
![]() |
||
|
![]() |
![]() |
![]() |
![]() |
// create two namespaces under the root namespace and create // a sphere under the root namespace and a sphere under one // of the new namespaces. namespace -set ":"; sphere -n sphere1; namespace -add nsA; namespace -add nsB; namespace -set nsA; sphere -n sphere2; namespace -set ":"; // change name of sphere1 rename sphere1 spinning_ball; // result: spinning_ball // // change name of spinning_ball back to sphere1 select -r spinning_ball; rename sphere1; // Result: sphere1 // // move sphere2 to namespace nsB rename nsA:sphere2 nsB:sphere2; // Result: nsB:sphere2 // // move sphere2 back to namespace nsA when not in the root namespace // Note the ":" appearing in front of the new name to indicate // we want to move the object to namespace nsA under the root namespace. namespace -set nsB; rename nsB:sphere2 :nsA:sphere2; // Result: nsA:sphere2 // // Let's try this without the leading ":" in the new name. // Since we are namespace nsA, in affect, what we are trying to do // is rename :nsB:sphere2 to :nsA:nsB:sphere3. Since there isn't a // nsB namespace under the namespace nsA, the namespace specification // on new name is ignored and a warning is issued. namespace -set ":nsA"; rename nsA:sphere2 nsB:sphere3; // Warning: Removing invalid characters from name. // // Result: nsA:sphere3 // // rename an object when not in the root namespace // and move the object to current namespace namespace -set ":nsB"; rename nsA:sphere3 sphere4; // Result: nsB:sphere4 // // rename an object with an absolute name to move it into a new namespace. // The namespace does not exist so will be created. namespace -set ":nsB"; rename nsA:sphere3 :nsC:sphere4; // Result: nsC:sphere4 //