PDA

View Full Version : Querying cluster weight


alesmav
09-18-2003, 11:32 AM
Hoy!

How do I query a weight value of a vertex, deformed with a cluster. I believe percent command should do it , but i don't know how?

ALES

jdj
09-24-2003, 04:48 PM
Hi

Straight from the horse's mouth (or Online Docs anyway):



-v/value double
The percent value to be applied. The default is 1. In query mode, returns an array of doubles corresponding to the weights of the selected object components.


so...

float $weights[] = `percent -q -v yourcluster`;

...then you pick the value from the $weights array.

Cheers!
/ Daniel
:beer:

alesmav
09-24-2003, 11:50 PM
Thanks, just tried it, but I can't figure out why I get this strange message:

// Error: No match to deformer name. //

, even though the cluster name was correct...


ALES

john_homer
09-25-2003, 05:32 AM
make sure you use the cluster name (listed in the clusterHandle outputs. in the channel box) not the clusterHandle name.

alesmav
09-25-2003, 10:36 AM
Thanks John...

It works just fine now. Luckily whatever you name you cluster handle, the cluster name is cluster handle name + "Cluster". Easy to incorporate into the script.

But I still find it kinda strange that if you query a cluster weight on a vertex outside the cluster, a value of 1 is returned. It does't really make sense, cos the cluster has no influence there...

ALES

CGTalk Moderation
01-16-2006, 04:09 AM
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.