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

Synopsis

character [-addElement characteritem*] [-characterOffset] [-characterPlug characterMember.attribute] [-clear character] [-empty] [-excludeDynamic] [-excludeRotate] [-excludeScale] [-excludeTranslate] [-excludeVisibility] [-flatten character] [-forceElement characteritem*] [-include characteritem*] [-intersection charactercharacter+] [-isIntersecting charactercharacter+] [-isMember characteritem*] [-library] [-memberIndex] [-name string] [-noWarnings] [-nodesOnly] [-query character] [-remove characteritem*] [-root] [-scheduler] [-subtract charactercharacter+] [-text string] [-union charactercharacter+] [-userAlias character.attribute] objects

character is undoable, queryable, and editable.

This command is used to manage the membership of a character. Characters are a type of set that gathers together the attributes of a node or nodes that a user wishes to animate as a single entity.

Flags

addElement, characterOffset, characterPlug, clear, empty, excludeDynamic, excludeRotate, excludeScale, excludeTranslate, excludeVisibility, flatten, forceElement, include, intersection, isIntersecting, isMember, library, memberIndex, name, noWarnings, nodesOnly, query, remove, root, scheduler, subtract, text, union, userAlias
Long name (short name) [argument types] Properties
-name(-n) string create
Assigns string as the name for a new character. Valid for operations that create a new character.
-text(-t) string createqueryedit
Defines an annotation string to be stored with the character.

In query mode, this flag needs a value.

-empty(-em) create
Indicates that the character to be created should be empty. (i.e. it ignores any arguments identifying objects to be added to the character.
-subtract(-sub) charactercharacter+
An operation between two characters which returns the members of the first character that are not in the second character. In general, characters should be mutually exclusive.
-union(-un) charactercharacter+
An operation that returns a list of all the members of all characters listed.
-intersection(-int) charactercharacter+
An operation that returns a list of items which are members of all the character in the list. In general, characters should be mutually exclusive.
-clear(-cl) character
An operation which removes all items from the given character.
-flatten(-fl) character
An operation that flattens the structure of the given character. That is, any characters contained by the given character will be replaced by its members so that the character no longer contains other characters but contains the other characters' members.
-query(-q) character query
Lists all members of the given character

In query mode, this flag needs a value.

-nodesOnly(-no) query
This flag modifies the results of character membership queries. When listing the attributes (e.g. sphere1.tx) contained in the character, list only the nodes. Each node will only be listed once, even if more than one attribute or component of the node exists in the character.

In query mode, this flag needs a value.

-isIntersecting(-ii) charactercharacter+
An operation which tests whether or not the characters in the list have common members. In general, characters should be mutually exclusive, so this should always return false.
-isMember(-im) characteritem*
An operation which tests whether or not all the given items are members of the given character.
-noWarnings(-nw) create
Indicates that warning messages should not be reported such as when trying to add an invalid item to a character. (used by UI)
-addElement(-add) characteritem* edit
Adds the list of items to the given character. If some of the items cannot be added to the character because they are in another character, the command will fail. When another character is passed to to -addElement, is is added as a sub character. When a node is passed in, it is expanded into its keyable attributes, which are then added to the character.
-include(-in) characteritem* edit
Adds the list of items to the given character. If some of the items cannot be added to the character, a warning will be issued. This is a less strict version of the -add/addElement operation.
-remove(-rm) characteritem* edit
Removes the list of items from the given character.
-forceElement(-fe) characteritem* edit
For use in edit mode only. Forces addition of the items to the character. If the items are in another character which is in the character partition, the items will be removed from the other character in order to keep the characters in the character partition mutually exclusive with respect to membership.
-excludeTranslate(-et) create
When creating the character, exclude translate attributes from transform-type nodes. For example, if your character contains joints only, perhaps you only want to include rotations in the character.
-excludeRotate(-er) create
When creating the character, exclude rotate attributes from transform-type nodes.
-excludeScale(-es) create
When creating the character, exclude scale attributes from transform-type nodes.
-excludeVisibility(-ev) create
When creating the character, exclude visibility attribute from transform-type nodes.
-excludeDynamic(-ed) create
When creating the character, exclude dynamic attributes.
-userAlias(-ua) character.attribute query
Returns the user defined alias for the given attribute on the character or and empty string if there is not one. Characters automatically alias the attributes where character animation data is stored. A user alias will exist when the automatic aliases are overridden using the aliasAttr command.

In query mode, this flag needs a value.

-characterPlug(-cp) characterMember.attribute query
Returns the plug on the character that corresponds to the specified character member.

In query mode, this flag needs a value.

-scheduler(-sc) query
Returns the scheduler associated with this character, if there is one. A scheduler will only exist if you have created clips on your character.

In query mode, this flag needs a value.

-library(-lib) query
Returns the clip library associated with this character, if there is one. A clip library will only exist if you have created clips on your character.

In query mode, this flag needs a value.

-memberIndex(-mi) query
Returns the memberIndex of the specified character member if used after the query flag. Or if used before the query flag, returns the member that corresponds to the specified index.

In query mode, this flag needs a value.

-root(-rt) create
Specifies the transform node which will act as the root of the character being created. This creates a characterOffset node in addition to the character node, which can be used to add offsets to the character to change the direction of the character's animtion without inserting additional nodes in its hierarchy.
-characterOffset(-cof) query
Returns the name of the characterOffset node used to add offsets to the root of the character.

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


string For creation operations (name of the character that was created or edited)

string[] For query operation (names of items in the character)

boolean For isMember operation

Related

bakeClip, characterMap, characterOutlineEditor, clip, clipEditor, clipSchedule

MEL examples

// create two characters with whatever is currently active
character;
character;

// create a set which contains two sub characters
character -n parentCharacter character1 character2;

// Add the keyable attributes of ikHandle1 to a character
character -add character1 ikHandle1;

// Remove the scale attributes for a transform from a character
character -remove character1 sphere1.sx sphere1.sy sphere1.sz;

// Query the members of the character
string $members[] = `character -q character1`;

// Query the character plug for a specified member
character -q -cp $members[0];

// Query the library and scheduler of the character
character -q -library character1;
character -q -sc character2;