How do I rollback a transformation?

Hello, so I’m doing a functionality about scaling a plane (in this case a ground) by a three dot system, I made the part where you put the three dots and then it is possible to accept the changes and move on.

Now I want to make the possibility to cancel the changes by pressing escape and making the figure to go back to it’s original size, the issue is the fact that I can’t figure out how to rollback the ground size to it’s original size, in my personal project where I’ve been implementing I tried to save the bounding box and bounding info of the baked figure and apply to the new one, but it didn’t work as intended :frowning: any help?

Here is the PG of the prototype of the idea I made, it’s kind of a mess but in short you press the letter G and then you put two dots and the third one gives you the scaling of the image.

How about copying the old scaling when “G” is pressed (line 68) and restoring it when escape is pressed (line 276)?


Worked like a charm! Many thanks!

1 Like