Ever wanted an attribute in two places, that would act as one. They’d have one animation curve shared between them and one shared output that you could feed off somewhere else. I’m not talking about adding the attribute to both and adding them together to get a result cause that’s just nasty to maintain. Rather a solution that if you alter the attribute to 3 here it’s changed to 3 there and can be used to drive a connection over there as 3 just like that.
Continue Reading!
K sure you could have an expression or possibly a scriptJob, maybe even write a plugin to do it but even that’s not ideal. Luckily for us here’s one possibility:
Now those that know me and my rigging style understand just how much I love to abuse the parent -shape command in maya, and here is just the latest reason why the -add flag. This can create an instance of a shape node on two transforms+ eg if the attributes are one the shape node they are available to any node that the shape is associated with.
Follow me that far? Here’s a demonstration of the concept:
//Start MEL – copy paste to script editor and execute
polyCube -n CubeA;
move -r -os -wd -2 0 0 ;
polyCube -n CubeB;
move -r -os -wd 2 0 0 ;
polyCone -n Cone;
select -cl ;
select -r CubeA ;
duplicate -rr;
select -r CubeA1Shape ;
select -add CubeA ;
parent -r -s;
delete CubeA1;
addAttr -ln Hide -k true -at bool -dv on CubeA1Shape;
select -r CubeA1Shape ;
select -add CubeB ;
parent -add -s;
setAttr CubeA1Shape.v 0;
connectAttr CubeA1Shape.Hide Cone.v;
rename CubeA1Shape Visibility_Config;
//End Mel demo
Now this has some large complications. First the shape node with your attributes must be the last one connected to a transform (eg planning ahead required) so that it’s visible by default in the channelbox. Secondly you’ll probally want to add a visible control shape and hide the instanced one if your controls should appear different. Third, because the attributes are on the shape the default key all doesn’t get them, so a custom hotkey must be made.
I’ve already applied this on the rigs for ik/fk blending etc Please post a comment if you can think of other possible uses – keep the sharing going!
previous entry |
next entry