snapToSystemAlign

snapToSystemAlign

Description

Snaps a node based on the coordinate system formed by three selected markers with options for how the snapped node will be aligned.

snapToSystemAlign is a more powerful version of snapToSystem.

snapToSystem aligns the X axis of the object being snapped at the second node selected and the Y axis of at the third node selected. This is often not the alignment you want. snapToSystemAlign allows you to specify which axis should point at the second node selected, and which axis should point at the third node selected. See snapToSystem for more information.

Functional area

Data editing

Command syntax

Syntax

snapToSystemAlign "targetNodeName" xOffset yOffset zOffset aimAxis upAxis [-allTime] [-positionOnly] [-rotationOnly] [-absolute] [-ranges]

Arguments

Name Type Required Comments
upAxis string yes Specifies which axis of the object being snapped should point to the third elected node which defines the Y axis of the local system.
aimAxis string yes Specifies which axis of the object being snapped should point to the second selected node which defines the X axis of the local system.
zOffset float yes Specifies the position offset to apply to the object being snapped on the Z axis of the space defined by the selected markers.
yOffset float yes Specifies the position offset to apply to the object being snapped on the Y axis of the space defined by the selected markers.
xOffset float yes Specifies the position offset to apply to the object being snapped on the X axis of the space defined by the selected markers.
targetNodeName string yes Name of the node that will be snapped.

Flags

Name Flag arguments Argument type Exclusive to Comments
allTime 0 ranges Performs the snap over the entire animation range.
positionOnly 0 rotationOnly Only modifies the position of the node being snapped.
rotationOnly 0 positionOnly
Only modifies the rotation of the node being snapped.
absolute 0 Specifies the offset is in mm rather then a percentage of the distance between the first two nodes that define the system.
ranges 0 allTime Performs the snap over the selected time ranges.

Return value

void

Examples

// Select 3 markers that define a coordinate system. First marker is
// the origin.
// Second marker is the X axis. Third marker is the Y axis. 
select VirtualElbowMarker VirtualWristMarker LOWR;
 
// Snap and align a bone named LeftElbow so that it starts at the
// virtual elbow marker, aims its Z axis at the virtual wrist marker, 
// and uses the left outer wrist marker as the up axis defining
// the twist along the Z axis.
snapToSystemAlign LeftElbow 0 0 0 "Z" "X" -allTime;

Additional information

Related commands