how can I use the ResetTransform in MaxScript?

how can I use the ResetTransform in MaxScript?

xiesansi
Enthusiast Enthusiast
1,139 Views
5 Replies
Message 1 of 6

how can I use the ResetTransform in MaxScript?

xiesansi
Enthusiast
Enthusiast

Hi!

I try to use Reset Transform for a Non-orthogonal object and export it as .fbx.
it works, Transform matrix has been orthogonalized and each vertex has been recalculated base on orthogonalized Transform.
But when I try use ResetTransform in MaxScript, Only Transform was orthogonalized, Vertex was't recalculated.
So how can I use the ResetTransform I want in MaxScript?

 

thanks in advance !

 

xiesansi_0-1652950447109.png

 

 

0 Likes
Accepted solutions (1)
1,140 Views
5 Replies
Replies (5)
Message 2 of 6

leeminardi
Mentor
Mentor

For the selected object the following will do.

ResetTransform $
lee.minardi
0 Likes
Message 3 of 6

xiesansi
Enthusiast
Enthusiast

Hi lee, thanks for your reply, 

 

Unfortunately, this doesn't seem to work for me.
The steps are:
Create a box in 3dmax

 

xiesansi_0-1653016839937.png

 

Apply rotation and scaling to the box, and turn the box into a non-orthogonal parallel hexahedron.

 

xiesansi_1-1653016883547.png

 

Export it to fbx, It warned me the box is non-orthogonal.
And import the box in maya, it still looks like orthogonal:

 

xiesansi_2-1653016908090.png


If I click Edit -> Transform -> Reset Transform, export it, and import it in maya, it's non-orthogonal.
That's what I want!

 

xiesansi_3-1653016932476.png

 

But If I use MaxScript ResetTransform $ , export it and import it in maya.
It's still orthogonal:

 

xiesansi_4-1653016961239.png

 

How can I keep it non-orthogonal using MaxScript?

Thanks in advance!

0 Likes
Message 4 of 6

denisT.MaxDoctor
Advisor
Advisor

I'm assuming the Reset Transform from the "menu" does two things corresponding to MXS as:

 

(
	resettransform $
	resetscale $
)

 

(it might be another order, but this order is more likely).


 

0 Likes
Message 5 of 6

xiesansi
Enthusiast
Enthusiast
Accepted solution

hi denis,

 

I found this works:

ResetXForm

 

0 Likes
Message 6 of 6

denisT.MaxDoctor
Advisor
Advisor

@xiesansi wrote:

I found this works:

 

 

ResetXForm

 

 

This is a different method. Not what you asked above. This method resets the object's transformation, not the node's transformation. But... if it works for you, then good.

 

This is what Reset Transform from the menu is:

 

denisTMaxDoctor_0-1653038163600.png

 

0 Likes