On 04/06/2015 at 02:19, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R16
Platform: Mac OSX ;
Language(s) : C++ ;
---------
Hi,
I'm working on an objectData plugin.
Inside my plugin I need a morph tag with some morphs.
Adding the morph tag and the morphs was no problem, editing the morphs was.
I have my morphtag on an object with 12 points. I used the following method:
myFirstMorphNode->SetPoint(6, myFirstMorphNode->GetPoint(7));
As far as I know this should set the point with index 6 to the position of the point with index 7.
But, it doesn't :s
Here is my full code about the morph tag:
CAPoseMorphTag* myMorphTag = CAPoseMorphTag::Alloc();
if (!myMorphTag) return false;
myMorphTag->SetParameter(DescID(ID_CA_POSE_POINTS), GeData(true), DESCFLAGS_SET_0);
myMorphTag->SetParameter(DescID(ID_CA_POSE_ADDMORPH), GeData(true), DESCFLAGS_SET_0);
myCube->InsertTag(myMorphTag);
myMorphTag->AddMorph();
CAMorph* myBaseMorph = myMorphTag->GetMorphBase();
if (!myBaseMorph) return false;
myMorphTag->AddMorph();
CAMorph* myFirstMorph = myMorphTag->GetMorph(1);
if (!myFirstMorph) return false;
CAMorphNode* myFirstMorphNode = myFirstMorph->GetFirst();
myFirstMorph->SetMode(doc, leftThighMorphTag, CAMORPH_MODE_FLAGS_ALL | CAMORPH_MODE_FLAGS_EXPAND, CAMORPH_MODE_ABS);
myFirstMorphNode->GetInfo() & CAMORPH_DATA_FLAGS_POINTS;
myFirstMorphNode->SetPoint(6, myFirstMorphNode->GetPoint(7));
myFirstMorph->SetMode(doc, leftThighMorphTag, CAMORPH_MODE_FLAGS_ALL | CAMORPH_MODE_FLAGS_COLLAPSE, CAMORPH_MODE_AUTO);
myMorphTag->UpdateMorphs();
Does anybody know what could be the problem here?
Thanks in advance for your help and time!
With kind regards,
Casimir Smets