THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/10/2010 at 00:43, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R12
Platform: Windows ;
Language(s) : C++ ;
---------
I'm using the Melange library to write a C4D file with joints, however the AddJoint() function fails every time.
It always return -1.
All pointers are valid. All joints have already been added to the document. And I made sure I was inserting the tag first
before calling AddJoint(), but it still fails. Any suggestions?
BaseTag *tag = BaseTag::Alloc(Tweights);
WeightTagData *wt = (WeightTagData * )tag->GetNodeData();
pPoly->InsertTag(tag);
for(i=0; i < num_joints; i++) {
joint_index = wt->AddJoint( joints[i].ob ); // returns -1 ??
}
btw, if you're wondering, I'm doing the exact same thing in C++ SDK, and it works there.
But with Melange, it fails.