Notifications
Clear all
[Closed] Query about "with undo"?
Jul 15, 2011 1:49 pm
I am currently working on a script that manipulates a selected cameras position via a spinner in a rollout floater. However transformations to the camera via the spinner didn’t generate any undo blocks. I resolved this by nesting a “with undo” into the button down event.
This works fine for transforms via “spinning” the spinner, but how can I catch manually entered values?
I tried nesting the “with undo” into the “On spn_CamX changed val” event but this generates hundreds of undo blocks.
I also tried it in “On spn_CamX entered” event but this didn’t give the desired result either.
On spn_CamX buttondown do with undo "cam move" on
(
Currentcam.pos.x = spn_CamX.value
)
On spn_CamX changed val do
(
Currentcam.pos.x = val
)
Any thoughts would be most appreciated.
Thanks,
D.
1 Reply
Jul 15, 2011 1:49 pm
use spinner’s entered event instead of changed or buttondown to register UNDO