# inherit scale between 2 objects?

#1

Hi

I have searched around the forum and in maya help,but I don´t know how to inherit just the scale between to objects.Let´s say that I have 2 boxes parented.Well,when I scale the parent,the child is scaled too.At least the child´s shape,because the scale of the child remains 1 1 1…so what is happening there?

thx

#2

The scale, in fact all transforms, IS being inherited.

Lets take a real simple example:

Lets say you have two group objects (which are just transforms without shapes):

nullA and nullB

``````
group -empty -name "nullA";
group -empty -name "nullB";

``````

Now lets parent nullB to nullA

``````
parent nullB nullA;

``````

Now lets scale up nullA to {10.0, 10.0, 10.0}

``````
setAttr "nullA.scale" 10.0 10.0 10.0;

``````

If you look at the scale of nullB it will still be {1.0, 1.0, 1.0}. As this is the ‘difference’ in scale between it’s parent and itself. Think of it like a multiplication, the scale on any object is it’s scale multiplied by it’s parents.
So object nullB scale = {1.0, 1.0, 1.0} * {10.0, 10.0, 10.0} = {10.0, 10.0, 10.0}

Therefore if you unparent nullB from nullA it’s scale will be set to {10.0, 10.0, 10.0} to compensate for the missing parent scale.

``````
parent -w nullB;
print (getAttr("nullB.scale"));

``````

Again this applies to all transforms but with the scale it’s a multiplication and the rotation/translation it’s an addition.

#3

I understand,thanks.But if I create an expresion dividing the childs scale for compensating the parent multiplication scale,I´ll mess the rotation…So,what can I do?

#4

I think you need to paste some examples of what you are doing. Also try and explain exactly what you are trying to achieve and maybe people can help you find the easiest way to get there.

#5

maybe don’t parent them, and use a point+orient constraint to mimic the parenting. Alternatively, you could use the parent constraint which doesn’t modify the childs scale. Thirdly, if it’s a joint, then the segment scale compensate may be the flag you are looking for.

#6

Ok guys,sorry for not explaning exactly what is all that about.The thing is that I am doing an fk/ik arm (or leg,or spine,or anything).The fk chain is made of polyCubes parented.So I need to be able to scale the arm polyCube,without afecting the foreArm polyCube.
I used to rig 3d max,and there,I can just diplay the bone joint as a bouncing box,thing that we can´t do in maya ,right?Is it a bad idea to use polyCubes for fk chains?I don´t like to use circle curves for that.I find more handy a box.

thx again

#7

Are you using maya joints here or are you parenting cubes directly?

#8

I have a chain of joints(skin joints) and a chain of cubes(fk controlers).The chain of joints is oriented contrained and scale constrained to the cubes chain.
That means that the chain of cubes are controling the chain of joints.

Just create 2 cube and make the parent and child.When you scale the parent,the child does to(because of what Impus explained before).I am starting to feel that I am asking something weird.

#9

Ok,this is it.Thanks.
So the diference between direct parenting and parenting contraint is only that the child´s scale isn´t modified?

#10

more or less, though maya has a few of ways of dealing with scale in a hierarchy. So a transform node can have an independent scale pivot; a joint can inherit the scaling (when segment scale compensate is turned off), or the child joints can have the inverse parent scaling applied (when segment scale compensate is turned on).

Parent constraints may be what you are after, but then again it depends if you want the boxes to act as selection handles for the joints. If you do, then it might be a case of doing something nasty with a selection based script job. Doing that is probably a bit nasty though…

#11

Ok,thanks Robert.I understand it better now.

#12

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.