Trigger ruby on SU8 model changes
-
Hi,
Is there any one who has answer to question.
How to catch (on the fly) with Ruby script any changes(drawing, painting) that user is doing in active model.I basically don't care what he is doing I need to know that he is doing something to model.
Krisjanis
-
Probably use the transaction observer - triggers when something is added to the undo stack. But not that a transaction != operation. Many transactions trigger in between an operation. And it triggers A LOT!!!! So be very careful with that you do there. You can esily slow down SU. But if you set a simple boolean ( @changed = true ) you might be ok. But you should profile this to be sure.
Also - never modify the model at these events - that's begging for a bugsplat. -
Thanks it helped.
Advertisement