[Closed] Selection Event Handler
Is there a event handler function in maxscript for handling the events on changing object selection? someting like “on selection changed do ()”
For rollups or other types of menus.
Thankyou
Yes, there is, its called change handler and it is documented. Search for “change handler” in the maxscript reference
[left]
Callbacks.AddScript #SelectionSetChanged "Code Here"
Also, if you do this with rollouts, maybe you want to prevent abusing refresh.
I’ve seen a lot of script with this problem. Here is my solution:
Use a timer control inactive by default.
When the timer tick, the rollout refresh itself and the timer return inactive.
The only thing the callback do is turn the timer on.
This way, the interval of the timer control will be a sort of “minimum refresh time”.
NodeEventCallback can also do this but I never tested it.
[/left]