Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

How to easily put all transformation, rotation and scaling values on 0 0 0?

How to easily put all transformation, rotation and scaling values on 0 0 0?

BenediZ
Collaborator Collaborator
4,162 Views
10 Replies
Message 1 of 11

How to easily put all transformation, rotation and scaling values on 0 0 0?

BenediZ
Collaborator
Collaborator

Hello,

sometimes there is the situation, you want to undo all transformations,rotations and scalings on an object.

It means NOT freezing the object "Reset XForm", it means that the object is moved back and oriented back and scaled to 000 of it's local space.

Like manually typing 0 in all three values for absolute transform, rotation and scaling.

Is there a command for this?

 

In Maya  - sorry again for always citing Maya here - this is "reset transformations" and can be applied to mulitple selected objects at once. Very handy and often used...

 

Thanks

 

Setting absolute values back to 0Setting absolute values back to 0

 

0 Likes
Accepted solutions (2)
4,163 Views
10 Replies
Replies (10)
Message 2 of 11

BenBisares
Autodesk Support
Autodesk Support

Right-clicking on any spinner (the up/down arrows) will always change the value to 0 or the lowest possible value (ex: Box segments minimum value is be 1).



Ben Bisares
Message 3 of 11

10DSpace
Advisor
Advisor

@BenediZ 

 

If I understand your question you want to be able to return to the transforms (scale, rotate and position) of an object at the time of it's original creation in the scene, right?  Like being able to undo for just a specific object the history of all transforms on it?   Like the construction history (I think it is called) in Maya?   So the general scene Undo function wouldn't work (and is not stored anyway after you quit max).     

 

If so, am pretty sure that there is not such a complete object-specific transform history that is stored in a max file.   However, in the animation menu there is "Set as skin pose" which will store the objects scale, rotation and position transforms.  If you later click on "Assume Skin Pose" in the animation menu, your object will be restored to the state of its transforms when set the skin pose.    

 

 

Message 4 of 11

leeminardi
Mentor
Mentor

I'm not sure that I understand your goal either.   If an object has been rotated in 3D several times then the World Rotate Transform  might look like this:

image.png

If you wanted  to reorient the object so that is was aligned to the world you could not just type in 0 for x, y, z as the angles are cumulative.   You could use the align tool though. Or, you could change the first three vectors of its transformation matrix to unit vectors in x, y, and z (i.e., [1,0,0] [0,1,0][0,0,1]) the 4th vector of the matrix is the position of the object.  By definition this is 0,0,0 in local coordinates.

If the object has been scaled you could rescale it to 1 by normalizing the first 3 vectors.  For example:

image.png

 

 

 

lee.minardi
Message 5 of 11

lynn_zhang
Alumni
Alumni

Hello @BenediZ ,

Just checking to see if your problem has been solved. Did the above response from our experts help answer your questions? Let us know if you still need help.





Lynn Zhang
Community Manager


0 Likes
Message 6 of 11

BenediZ
Collaborator
Collaborator

@leeminardi  Thanks, could you just explain, how to use that "matrix" for someone who's not experienced in 3dsMax? 😉

 

Is this a script command which would work with copy and paste into the maxscript?

Is it possible to apply that to multiple objects?

 

What exactly would I have to write into maxscript (because I wonder that I see in the first line very special values, that confuse me)

Many thanks.

0 Likes
Message 7 of 11

leeminardi
Mentor
Mentor
Accepted solution

The following MaxScript will scale selected object to 1 and reorient them to world coordinates.  It will not change their position.

-- scales selected object to 1 and orients them to world coordinate
-- lrm  5/15/2020
objs = getcurrentselection()
for i in objs do
(
i.transform = (matrix3 [1,0,0][ 0,1,0][0,0,1] i.pos )
)
lee.minardi
Message 8 of 11

BenediZ
Collaborator
Collaborator

@leeminardi that's great.

is there also a chance to get the position reset, too? 🙂

then it would be like the "reset transformations", we are using in Maya. thanks!

 

(I tried to figure it out myself with editing your lines, but it's too far from what I'm used in MEL)

 

Message 9 of 11

leeminardi
Mentor
Mentor

What should the position be reset to?

lee.minardi
0 Likes
Message 10 of 11

BenediZ
Collaborator
Collaborator

Absolute world set on 0 0 0 , this would be great

 

move on 000.jpg

 

 

0 Likes
Message 11 of 11

leeminardi
Mentor
Mentor
Accepted solution

Just change the line:

i.transform = (matrix3 [1,0,0][ 0,1,0][0,0,1] i.pos )

to 

i.transform = (matrix3 [1,0,0][ 0,1,0][0,0,1][0,0,0])

 

lee.minardi