Named Selection Set Notification

#NamedSelSetCreated: string 

Sent after a named selection set is created.

Calling callbacks.notificationParam() will return the new selection set name.

Available in 3ds Max 9 and higher.

#NamedSelSetDeleted: string 

Sent after a named selection set is deleted.

Calling callbacks.notificationParam() will return the name of the deleted named selections set.

Available in 3ds Max 9 and higher.

#NamedSelSetRenamed: string 

Sent after a named selection set is renamed.

Calling callbacks.notificationParam() will return an array containing the old name and new name of the renamed selection set.

Available in 3ds Max 9 and higher.

#NamedSelSetPreModify: string 

Sent when the node set of a named selection set begins to be changed. For example, when nodes are added or removed from a named selection set,or the node set of a named selection set is completely replaced.

Calling callbacks.notificationParam() will return the name of the modified selection set.

#NamedSelSetPostModify: string 

Sent when the node set of a named selection set has been changed.

Calling callbacks.notificationParam() will return the name of the modified selection set.

Adding or Removing Nodes from a Named Selection Set

When a node is added to or removed from a named selection set, the old named selection set is removed from the Named Selection Set Manager and a new named selection set with the same name is created and added to the Named Selection Set Manager. This removal and addition will result in #NamedSelSetDeleted and #NamedSelSetCreated events being fired. To distinguish between the events associated with a node being added or removed from a selection set, and the addition or deletion of a named selection set, the events associated with a node being added or removed will be surrounded by #NamedSelSetPreModify and #NamedSelSetPostModify events.

If you run the following:

callbacks.removeScripts id:#NamedSelSetTest
callbacks.addscript #NamedSelSetDeleted "format \"% : %\\n\" #NamedSelSetDeleted (callbacks.notificationParam())" id:#NamedSelSetTest
callbacks.addscript #NamedSelSetCreated "format \"% : %\\n\" #NamedSelSetCreated (callbacks.notificationParam())" id:#NamedSelSetTest
callbacks.addscript #NamedSelSetRenamed "format \"% : %\\n\" #NamedSelSetRenamed (callbacks.notificationParam())" id:#NamedSelSetTest
callbacks.addscript #NamedSelSetPreModify "format \"% : %\\n\" #NamedSelSetPreModify (callbacks.notificationParam())" id:#NamedSelSetTest
callbacks.addscript #NamedSelSetPostModify "format \"% : %\\n\" #NamedSelSetPostModify (callbacks.notificationParam())" id:#NamedSelSetTest

and create a named selection set called "set1", the following event will fire:

#NamedSelSetCreated : set1

If you add a node to named selection set "set1", the following events will fire:

#NamedSelSetPreModify : set1
#NamedSelSetDeleted : set1
#NamedSelSetCreated : set1
#NamedSelSetPostModify : set1

If you add remove a node from named selection set "set1", the following events will fire:

#NamedSelSetPreModify : set1
#NamedSelSetDeleted : set1
#NamedSelSetCreated : set1
#NamedSelSetPostModify : set1

If you remove the named selection set "set1" from named selection set manager, the following event will fire:

#NamedSelSetDeleted : set1