Your Ad Here

Go to: Synopsis. Flags. Return value. Keywords. MEL examples.

Synopsis

polyColorSet [-allColorSets] [-colorSet string] [-copy] [-create] [-currentColorSet] [-delete] [-newColorSet string] [-rename]

polyColorSet is undoable, queryable, and editable.

Command to do the following to color sets: - delete an existing color set. - rename an existing color set. - create a new empty color set. - set the current color set to a pre-existing color set. - query the current color set. - query the names of all color sets.

Flags

allColorSets, colorSet, copy, create, currentColorSet, delete, newColorSet, rename
Long name (short name) [argument types] Properties
-colorSet(-cs) string createqueryedit
Specifies the name of the color set that this command needs to work on. This flag has to be specified for this command to do anything meaningful other than query the current color set.

In query mode, this flag needs a value.

-currentColorSet(-ccs) createqueryedit
This flag when used will set the current color set that the object needs to work on, to be the color set corresponding to the name specified with the colorSet flag. This does require that a colorSet with the specified name exist. When queried, this returns the current color set.

In query mode, this flag needs a value.

-newColorSet(-nc) string createqueryedit
Specifies the name that the color set corresponding to the name specified with the colorSet flag, needs to be renamed to.

In query mode, this flag needs a value.

-rename(-rn) createqueryedit
This flag when used will result in the renaming of the color set corresponding to the name specified with the colorSet flag to the name specified using the newColorSet flag.

In query mode, this flag needs a value.

-delete(-d) createqueryedit
This flag when used will result in the deletion of the color set corresponding to the name specified with the colorSet flag.

In query mode, this flag needs a value.

-copy(-cp) createqueryedit
This flag when used will result in the copying of the color set corresponding to name specified with the colorSet flag to the colorSet corresponding to the name specified with the newcolorSet flag

In query mode, this flag needs a value.

-create(-cr) createqueryedit
This flag when used will result in the creation of an empty color set corresponding to the name specified with the colorSet flag. If a color set with that name already exists, then no new color set will be created.

In query mode, this flag needs a value.

-allColorSets(-acs) createqueryedit
This flag when used in in a query will return a list of all of the color set names

In query mode, this flag needs a value.


Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command

Return value


boolean Success or Failure.

Keywords

poly, colorSet, currentColorSet, renameColorSet, deleteColorSet, copyColorSet, createColorSet

MEL examples

// To set the current color set to be "color2".
polyColorSet -currentColorSet -colorSet "color2";
// To query the current color set.
polyColorSet -q -currentColorSet;
// To rename a currently existing color set from "color3" to "color4".
polyColorSet -rename -colorSet "color3" -newColorSet "color4";
// Rename the current color set (if any) to "color3".
polyColorSet -rename -newColorSet "color3";
// To delete a currently existing color set "color3".
polyColorSet -delete -colorSet "color3";
// To delete the current color set (if any)
polyColorSet -delete;
// Copy values of color set "color1" to "color2"
// Note if the second color set exist it will be overwriten by
// the copy. Leaving the destination color blank and the command
// will generate a new unique name based on the source name.
polyColorSet -copy -colorSet "color1" -newColorSet "color2";
// Copy values of the current color set to "color2"
polyColorSet -copy -newColorSet "color2";
// Make a copy of "color1" to a new color set. The
// name of which is automatically generated and returned.
polyColorSet -copy -colorSet "color1";
// Create a new empty color set
polyColorSet -create -colorSet "newColor";
// To query all of the color sets
polyColorSet -q -allColorSets;
	

Return to Autodesk Index


Your Ad Here