Hello,
I'm working on a tag plugin that is using positional data of an object to drive parameters. This is simple and straightforward so it is working properly using the code below inside of the Execute function to drive the Radius value of a sphere object.
EXECUTIONRESULT TagParamRun::Execute(BaseTag* tag, BaseDocument* doc, BaseObject* op, BaseThread* bt, Int32 priority, EXECUTIONFLAGS flags)
{
if (tag->GetObject())
{
BaseObject* parentObj = tag->GetObject();
if (parentObj->GetType() == Osphere)
{
ApplicationOutput("Parent object " + parentObj->GetName());
Matrix sphereMat = parentObj->GetMg();
Vector spherePos = sphereMat.off;
Vector centerPos = Vector(0);
Float distance = sqrt(pow(spherePos.x - centerPos.x, 2) + pow(spherePos.y - centerPos.y, 2) + pow(spherePos.z - centerPos.z, 2));
GeData setData;
distance = distance / 2;
if (distance > 50)
distance = 50;
setData.SetFloat(100 - distance);
parentObj->SetParameter(ConstDescID(DescLevel(PRIM_SPHERE_RAD)), setData, DESCFLAGS_SET::NONE);
}
}
return EXECUTIONRESULT::OK;
}
My issue comes in when I have the object with my tag under a Cloner. As I drag the tag's object around the scene all of the cloned spheres are changing their radius based on that single object instead of their cloned positions. Shown below.

If I make the cloner edititable then the setup is working as I would expect.

Is there a way to make it so that my tag is running after the Cloner has run? In this case 9 separate spheres with attached tags running on their own positions.
Any help would be greatly appreciated.
John Thomas