ScriptSpot home

Forum topic · General Scripting

"Easy way" to check if object have not reseted transform

By Branko Živković · 2013-02-23

Description

Objects that have been scaled or mirrored at the object level, attached also will result in a transform matrix that doesn't have all of its axes at right angles to each other. I looking the way to find out which scene objects have bed transform
and reset their transform.

I don't know is this right way

fn doRXF obj =
(
if obj.transform as string != obj.objectTransform as string do
(
obj.pivot = obj.center
ResetXForm obj
convertToPoly obj -- this is optional
)
)

Comments (8)
eramorse

Thank you for sharing this informative blog. This is really an interesting post and I tried your code and it's working. I've been looking for this code for my project reference and thank you so much for providing it. We really appreciate your blog.

testosterone booster

how to boost testosterone

Rio Mukti

Useful information

I found problem of resetter and this post give me a very useful for my problem

Branko Živković

Another example


(
delete objects
b = converttopoly (Box())
polyop.createShape b #{1, 8, 10, 12}
spl = objects[objects.count]
centerpivot spl
select spl
format "tm = %\nobjTM = %\n" (spl.transform) (spl.objecttransform)
)

Reply to Branko Živković
Panayot Karabakalov

if by bed transform you mean the translation part then looks like you have solution ;)

Panayot Karabakalov

Compare #transform to #objectTransform should always return true.

Reply to Panayot Karabakalov
Branko Živković

Try to affectPivot Only and manualy rotate axis gizmo.
Then check $.transform and $.objecttransform