Notifications
Clear all

[Closed] Scale of linked object returns parents' scale?

Hi there,

                    I’m creating a small pre-render checkup tool for our production, which checks some basic things in a scene - such as objects not being scaled (whether scaling things to other than 100,100,100 is a good thing or not is a discussion for another time and place). 

                                          Anyway, what I’ve got currently is something like:                     
for i in objects do (
 
 scl = i.scale
 print scl

)
                    sometimes, however, this outputs different than [1,1,1], despite i’s scale showing as 100,100,100 in the viewport. It seems this occurs when i is linked to an object that is scaled. Is it possible to get the “native” scale of i, ignoring any scaling it inherits from its parent? (forgive my terminology, I’m not sure how to describe it otherwise). 

                                          Example:                     

                    Object01 is linked to Object02. Object02 is scaled to [120,120,120], while Object01 is not scaled (ie, it’s [100,100,100]). When I query Object01’s scale through MAXScript, it outputs [1.2,1.2,1.2].
2 Replies
 JHN

Try this


 in coordsys parent i.scale
 -- or
i.transform.controller.scale
 

The context in which you try to figure out the scale needs to be adressed, since all transform is being done in parent coordsys, you need to figure it out in that coordsys. You can also always just get the data straight from the controller, like in the second example.

-Johan

Yeah, i.transform.controller.scale was exactly what I was after. Thanks!