ScriptSpot

Forum topic · General Scripting

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

By barigazy · 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 · 2013-05-22

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

Useful information

riomukti21 · 2013-03-07

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

Another example

barigazy · 2013-02-23


(
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)
)

Anubis · 2013-02-25

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

barigazy · 2013-02-25

yep, translation but also scale and rotation. My solution works fine for now:)

Anubis · 2013-02-23

Compare #transform to #objectTransform should always return true.

barigazy · 2013-02-23

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

aha :)

Anubis · 2013-02-25

now i get what you mean ;-)