Notifications
Clear all

[Closed] How to figured out which selection mode you are in?

I am attempting to write a script that will respond differently based on what selection mode the user is in while modeling. For instance, if the user is in vertex selection mode on an editable poly, it will do X. If they are in face selection mode, it will do Y.

I am honestly just having a hard time finding good reference/documentation on maxscript for 2016 in general. Any help would be appreciated.

2 Replies
1 Reply
(@denist)
Joined: 1 year ago

Posts: 0

it’s in the mxs help -> modPanel methods

You can use:

subobjectlevel

to get the current subobject mode. To set the subobject mode you use:

subobjectlevel = x

where “x” is the number of the level. For example the followgin will set the subobject mode to polygon:

subobjectlevel=4

For Editable Poly the modes are as follow:

1 = vertex
  2 = edge
  3 = border
  4 = polygon
  5 = element