THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/09/2007 at 09:16, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R10
Platform: Mac OSX ;
Language(s) :
---------
I'm having trouble getting joint references from a CAWeightTag.
I can get joint count, weight count, and weights themseves, but not a reference to a joint.
using wtag->GetJoint(i, NULL ) should return a joint ref, but fails, I have tried passing the BaseDocument reference even though the docs say I can pass null
please help.
> _
> static void GetWeightInfo(CAWeightTag *wtag) {
> if(LONG n = wtag->GetJointCount() ) {
> GePrint("weight joint count " + LongToString(n) );
> for(LONG i=0; i<n; i++) {
> if(BaseObject *jointRef = wtag->GetJoint(i, NULL ) ) {
> GePrint(jointRef->GetName());
> }
> if(LONG nw = wtag->GetWeightCount(i) ) {
> GePrint(String("joint ") + LongToString(i) + String(" weight count ") + LongToString(nw) );
> }
> }
> }
> }
> _