Go to: Synopsis. Return value. MEL examples.
renameSelectionList(string $newName)
int : The number of renamed objects. May be 0 if all the objects on the selection list are read-only. A negative number is returned for errors. -1 is returned when the selection list is empty. -2 is returned if the argument is an empty string or invalid name. |
Variable Name | Variable Type | Description |
---|---|---|
$newName | string | Name for the objects in the selection list. Must not be an empty string. Valid names begin with a letter or underscore, followed by letters, digits or underscores. |
// Create a few objects. Select one and rename it. // $cone1 = `cone`; $cone2 = `cone`; $cone3 = `cone`; select $cone1; renameSelectionList("Cone"); // Add the other objects to the selection list and rename // them all. // select -add $cone2; select -add $cone3; renameSelectionList("Object");