/
getPosition
getPosition
Description
Retrieves the local or world-space position of a node at the current time.
Functional area
Data retrieval
Command syntax
Syntax
getPosition "moduleName" [-ws] [-inSpaceOf string] [-preTrans] [-default] |
Arguments
Name | Type | Required | Comments |
---|---|---|---|
nodeName | string | yes | The node to get position for. |
Flags
Name | Flag arguments | Argument type | Exclusive to | Comments |
---|---|---|---|---|
ws | 0 | — | inSpaceOf | Specifies that the worldspace value should be retrieved. The default is to retrieve local. |
inSpaceOf | 1 | string | ws | The string passed in with this flag should be a module in the scene. The position returned is relative to the module passed in with this flag from the module passed into the command. |
preTrans | 0 | — | default | Gets the pre-translation of the module passed in. Pre-translation can be found in the Attributes panel. |
default | 0 | — | preTrans | This will retrieve the default position for the module passed in. The default can be viewed in the Channels panel by using the toolbar button with a d. |
Return value
vector
Examples
// Get the local and world space position // of the rhumerus bone. vector $localPos; vector $wsPos; // First the local $localPos = `getPosition "rhumerus"`; // And then the world space $wsPos = `getPosition "rhumerus" -ws`; print $localPos; print $wsPos;
Additional information
Related commands
, multiple selections available,