PDA

View Full Version : blendShape atts


mrMotion
11-23-2004, 10:02 PM
I need to list the attributes / the shapes in a blendShape node.
When I use "listAttr -k" I only get the envelope weight. Why?
Is there another command or flag I can use to list these attributes?

teep
11-24-2004, 02:53 AM
try this...

listAttr -m blendShape1.w;


hope it helps,
teep

brubin
11-24-2004, 11:11 AM
try this:
{
// find all blendshapeNodes

string $blendShapes[] = `ls -typ "blendShape"` ;

string $each ;

for ($each in $blendShapes)

{

string $attribs[]; clear $attribs ;

// find the targets (attributes)

$attribs = `blendShape -q -t $each` ;

print ("\n*************************\n"+$each+":\n") ;

print $attribs ;

}

}

HIH
s.

mrMotion
11-24-2004, 02:19 PM
thanks!

listAttr -k -m works great... but I wonder what a multi-attribute is (as in -m)...

kiaran
02-10-2005, 02:02 AM
but I wonder what a multi-attribute is

I just had this same problem. Can anybody shed some light on why -k -m works? What exactly is a multi-attribute?

Any help would be appreciated. I hate scripting things when I don't know why they work.

ajk48n
02-10-2005, 03:01 AM
A multi-attribute is an attribute that is not an array, but has multiple values. A good example is the translate attribute. Technically, it's only 1 attribute, but it has multiple parts, translateX, translateY, and translateZ.

mrMotion
02-10-2005, 08:16 AM
translate is actually a vector-attibute not a multi-attribute. A vector has only three values but a multi-attribute can have as many as you want (just like the input on a plusMinusAverage node). Looks just like an array to me?

Vector can be made from the add attribute window, but a multi-attribute can not. To make a multi-attribute:

addAttr -m -ln myMulti -at double -k 1;
setAttr ".myMulti[0]" 2;
setAttr ".myMulti[1]" 3;
setAttr ".myMulti[2]" 8;
setAttr ".myMulti[3]" 7;
setAttr ".myMulti[4]" 5;
// etc...

kiaran
02-10-2005, 06:51 PM
Ok, so the blendshapes in a blendshape node are actually multi-attributes then?

mrMotion
02-11-2005, 07:53 AM
Yes... It looks like the shape is connected to a multi-attribute inside of other multi-attributes; some strange things happening here:

http://www.ideweb.com/Bildearkiv%20Forum/3D%20Animasjon/kjetilhk/blendShapeConnect.jpg

kiaran
02-11-2005, 06:47 PM
Ok, this is making more sense now. This is why, when you add a blendshape to an existing node, you must specify an index.

blendShape -edit -target <baseMesh> <index> <targetMesh> <weight> ....;

So mult attr do kindof act like an array. They are arranged using the same 0-based indices.

CGTalk Moderation
02-11-2006, 07:00 PM
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.