Jump to content
Search Community

Resetting a transform

atmofunk test
Moderator Tag

Recommended Posts

I'm looking for a TransformItem.resetTransform() or something along that lines to take whatever item (or list of them) and set them back to their original x/y, scale, and rotation. I'm surprised there isn't any sort of reset() method included in this package.. unless i've totally missed it.

 

Of course, i could hold on to the original values myself and apply a manual transform when i need it, but hey.. a resetTransform() would be much nicer.

 

cheers

Link to comment
Share on other sites

When you say resetTransform(), do you mean remove any scaling, rotation, and x/y translation whatsoever? If so, that should be as simple as:

myObject.transform.matrix = new Matrix();

 

If the object is selected, just make sure you call the TransformManager's updateSelection() method to make sure the selection box/handles get adjusted.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...