On 21/12/2017 at 13:14, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R14
Platform: Windows ;
Language(s) : C++ ;
---------
Hello,
I am working on a tag plugin that will change the position of a baseobject that it is placed on. When I just play through the timeline the tag successfully changes the position based on a vector that I store inside the tag's basecontainer. Every time that the Execute function runs the stored vector is increased by a set amount.
My problem comes in when I try to render out the scene with a Sub-Frame Motion Blur. It doesn't seem like the basecontainer is updated each time a sub-frame is run during the render process. In the render the baseobject doesn't have the motion blur because the baseobject's position is only updated a few times during the render.
This is a trimmed down version of the code.
EXECUTIONRESULT GorillaCamClass::Execute(BaseTag *tag, BaseDocument *doc, BaseObject *op, BaseThread *bt, LONG priority, EXECUTIONFLAGS flags)
{
if(!doc || !op)
return EXECUTIONRESULT_OK ;
BaseContainer data = tag->GetData();
Vector distanceVector = data.GetVector(idSavedVector);
distanceVector = distanceVector + Vector(20);
op->SetAbsPos(distanceVector);
data.SetVector(idSavedVector, distanceVector);
tag->SetData(data);
return EXECUTIONRESULT_OK;
}
When I bake the baseobject's position the render properly displays the Motion Blur.
Is there something that I am missing that would properly update the tag's basecontainer, any help would be greatly appreciated.
Johan H.