The snapMode struct provides system globals and functions to access and control the snapping options through MAXScript.
A 3ds Max System Global that lets you get and set whether Snap is active.
Get/Set the current snap type as a name. Possible names are #2D , #2_5D , and #3D .
The snapMode structure has been extended in 3ds Max 7 to provide access to all Snap settings and Snap results. Prior to 3ds Max 7, these properties were available in the third-party Avguard Extensions.
A System Global that lets you get and set the Snap Preview Radius value.
Available in 3ds Max 7 and higher.
A System Global that lets you get and set the Snap Radius value.
Available in 3ds Max 7 and higher.
A System Global that lets you get and set the color value of the Snap Marker.
Available in 3ds Max 7 and higher.
A System Global that lets you get and set the Snap Marker Size.
Available in 3ds Max 7 and higher.
A System Global that lets you get and set whether to snap to frozen objects.
Available in 3ds Max 7 and higher.
A System Global that lets you get and set whether the snap must use axis constraints as Boolean value.
Corresponds to the checkbox in the "Grid and Snap Settings" dialog, Options tab.
Available in 3ds Max 7 and higher.
A System Global that lets you get and set whether to display rubber band as a Boolean value.
Corresponds to the checkbox in the "Grid and Snap Settings" dialog, Options tab.
Available in 3ds Max 7 and higher.
A System Global that lets you get and set the state of the "Use Axis Center As Start Snap Point" option as Boolean value.
Corresponds to the checkbox in the "Grid and Snap Settings" dialog, Options tab.
Available in 3ds Max 7 and higher up to 3ds Max 2010.
Attempting to access this property will result in:
-- Runtime error: Cannot set this snap option. It has been deprecated as of 3ds Max 2011.
A System Global that lets you get and set whether the Snap Marker is displayed.
Available in 3ds Max 7 and higher.
A System Global that lets you get and set the Snap Strength as an integer value.
Available in 3ds Max 7 and higher.
A System Global that contains true if the Marker is currently snapped to something, false if not snapped.
Contains undefined if Snaps are not active.
Available in 3ds Max 7 and higher.
A System Global that contains the node currently being snapped to.
Contains undefined if not snapped to a node or if Snaps are not active.
Available in 3ds Max 7 and higher.
A System Global that contains the Snap System Flags as an integer.
Contains undefined if Snaps are not active.
Available in 3ds Max 7 and higher.
A System Global that contains the last Snap Point as Point3 coordinate in local coordinates of the node snapped to.
Contains undefined if Snaps are not active.
Available in 3ds Max 7 and higher.
A System Global that contains the last Snap Point as Point3 world coordinate.
Contains undefined if Snaps are not active.
Available in 3ds Max 7 and higher.
A System Global that contains the last Snap Point as a Point3 screen coordinate.
Contains undefined if Snaps are not active.
Available in 3ds Max 7 and higher.
snapMode.screenHitPointUnscaled
NEW in 3ds Max 2017: A System Global that contains the last Snap Point as an unscaled Point3 screen coordinate.
Contains undefined if Snaps are not active.
Read only.
Contains undefined if Snaps are not active.
A System Global that contains true if at least one Snap Point has been recorded.
Contains undefined if Snaps are not active.
Available in 3ds Max 7 and higher.
A System Global that contains the last Snap Point as point3 world coordinate.
Contains undefined if Snaps are not active.
Available in 3ds Max 7 and higher.
A System Global that contains the first snap point as point3 world coordinate.
Contains undefined if Snaps are not active.
Available in 3ds Max 7 and higher.
A System Global that contains the number of OSnaps as an integer.
Currently there are 6 sets of OSnaps - see below of details.
Available in 3ds Max 7 and higher.
Returns the name of the indexed OSnap as string.
1 - "Body" - Available in 3ds Max 2011 and higher.
3 - "Point Cloud Objects" - Available in 3ds Max 2015 and higher.
All others available in 3ds Max 7 and higher.
Returns the number of OSnap items in the indexed OSnap as <integer>.
Available in 3ds Max 7 and higher.
Possible osnap_index values are:
Returns the name of the indexed OSnap item in the indexed OSnap as string.
See table above for currently implemented names.
Available in 3ds Max 7 and higher.
Returns the tooltip of the indexed OSnap item in the indexed OSnap as string.
Available in 3ds Max 7 and higher.
Returns true if the indexed OSnap item in the indexed OSnap is active, false otherwise.
Available in 3ds Max 7 and higher.
Sets whether the indexed OSnap item in the indexed OSnap is active.
Available in 3ds Max 7 and higher.
The following example shows how to access and change the snap options:
The following example prints information about the snap marker's settings:
The following example shows how to access and print dynamically the results of the snap operations in the viewports: