On 11/04/2016 at 12:39, xxxxxxxx wrote:
User Information:
Cinema 4D Version: r14+
Platform: Windows ;
Language(s) : C++ ;
---------
Hi there, after some absence from coding i am struggling setting the ALIGNTOSPLINETAG_LINK of tag.
this is the code (where step is just some other BaseObject created in a loop) :
BaseObject* splineLink = static_cast<BaseObject*>((BaseObject* )bc->GetObjectLink(USERSPLINE, doc)->GetClone(COPYFLAGS_0, NULL));
splineLink->InsertUnder(main);
BaseTag* alignToSpline = step->MakeTag(Taligntospline);
alignToSpline -> SetParameter(DescID(ALIGNTOSPLINETAG_LINK),GeData(splineLink),DESCFLAGS_SET_0);
alignToSpline -> SetParameter(DescID(ALIGNTOSPLINETAG_TANGENTIAL),GeData(useTangent),DESCFLAGS_SET_0);
alignToSpline -> SetParameter(DescID(ALIGNTOSPLINETAG_POSITION),GeData((1.0/(max-1))*current),DESCFLAGS_SET_0);
this results in that the tangent rotation is working, but the positioning only works after converting the object to an editable one.
any ideas what i may be missing?
thanks,
Ello