Scale entity without scaling the children?

Is it possible to write a script that scales an entity (or rather it’s model?) without affecting its children?

Let’s say I have a box with other boxes as children:

Box1
–Box2
–Box3

How do I scale (or translate, rotate) Box1 without affecting Box2 and Box3?

Children always inherit the parent transform. So you would have to “unscale” the children to return them to their original size.

e.g.

var scale = 10;
parent.setLocalScale(scale, scale, scale);
child.setLocalScale(1/scale, 1/scale, 1/scale);

Alternatively, change your entity hierarchy and make the 3 boxes siblings instead of parent-child.