[Closed] MaxScript flag modifiers "ligth icon"
plugin modifier MyModifier
name:“MyModifier”
classID:#(123456789, 123456789)
– extends:EmptyModifier
It changes the node topology.
(Yes, I’m fighting against Elements, but I’m winning!)
you could probably catch this with a ‘when’ handler, not that I’ve tried. But this is supposed to be done by default, it would be crazy if each modifier had to implement this.
another what you can try is NodeEventCallback…
more likely: #modelStructured or #modelOtherEvent
Thanks @lo and @DenisT.
For NodeEventCallback, these are the events called when clicking the icon:
Event Detected: Event #callbackBegin, Nodes #()
Event Detected: Event #geometryChanged, Nodes #(9623)
Event Detected: Event #topologyChanged, Nodes #(9623)
Event Detected: Event #mappingChanged, Nodes #(9623)
Event Detected: Event #extentionChannelChanged, Nodes #(9623)
Event Detected: Event #renderPropertiesChanged, Nodes #(9623)
Event Detected: Event #displayPropertiesChanged, Nodes #(9623)
Event Detected: Event #subobjectSelectionChanged, Nodes #(9623)
Event Detected: Event #callbackEnd, Nodes #()
It’s incompatible with what I want. All of them are called for example just moving the timeSlider. It should slow down very much.
With the ‘when’ handler, the only event catched clicking the light icon is #topology (9 times, by the way!).
But as in the case before, it’s been catched in several situations because of my plugin actions. It should slow down very much too.
Never mind. It’s not something very important to its usability.
Thanks a lot. I’m learning a lot thanks to your help.
I’m thinking that the ‘when handler’ is perhaps not so bad.
As you can define it for just the object you want and as you can click the ‘light icon’ just by hand when you are in the Modify Panel, it’s easy to create the handler on the “on params open” event and to delete it on the “on params close” event.
Perhaps I need an additional parameter as flag to hold the previous state to compare when the system fires the callback to avoid multiple actions, but it can work fine.
Thanks again.