Hello
I'm working on a plugin that has an In/Exclude List for a user to feed in Effectors in a similar way to Mograph objects, my plugin is meant to act as a pseudo Mograph object. I've been able to mimic almost all of the same kind of functionality that Cinema offers with its Mograph objects.
The only functionality that I'm missing is when a Mograph object is selected and then an Effector is added into the scene, the Effector will be linked to the Mograph object's effector list.
Here is my code for creating my In/Exclude.
Bool EffectorClass::GetDDescription(GeListNode *node, Description *description, DESCFLAGS_DESC &flags)
{
BaseContainer *datainstance;
const DescID *singleid;
if (!description->LoadDescription(node->GetType()))
{
}
datainstance = ((BaseList2D*)node)->GetDataInstance();
if (!datainstance)
return FALSE;
singleid = description->GetSingleDescID();
DescID cid;
DescID DescMainTabGroup = DescLevel(10001, DTYPE_GROUP, 0);
if (!singleid || DescMainTabGroup.IsPartOf(*singleid, NULL))
{
BaseContainer bc;
bc = GetCustomDataTypeDefault(DTYPE_GROUP);
bc.SetString(DESC_NAME, "Effector Control"_s);
bc.SetInt32(DESC_COLUMNS, 1);
bc.SetInt32(DESC_DEFAULT, 1);
bc.SetBool(DESC_SCALEH, TRUE);
if (!description->SetParameter(DescMainTabGroup, bc, DescLevel(ID_RKTMESHSPLINE)))
return TRUE;
}
cid = DescLevel(10002, CUSTOMDATATYPE_INEXCLUDE_LIST, 0);
if (!singleid || cid.IsPartOf(*singleid, NULL))
{
BaseContainer bc;
bc = GetCustomDataTypeDefault(CUSTOMGUI_INEXCLUDE_LIST);
bc.SetString(DESC_NAME, "Effectors"_s);
BaseContainer acceptedObjects;
acceptedObjects.InsData(Obaseeffector, String());
acceptedObjects.InsData(Oweighteffector, String());
acceptedObjects.InsData(1001381, String());
bc.SetInt32(IN_EXCLUDE_FLAG_INIT_STATE, 3);
bc.SetInt32(IN_EXCLUDE_FLAG_NUM_FLAGS, 2);
bc.SetInt32(IN_EXCLUDE_FLAG_IMAGE_01_ON, 300000131);
bc.SetInt32(IN_EXCLUDE_FLAG_IMAGE_01_OFF, 300000130);
bc.SetContainer(DESC_ACCEPT, acceptedObjects);
bc.SetBool(IN_EXCLUDE_FLAG_SEND_SELCHANGE_MSG, true);
bc.SetInt32(IN_EXCLUDE_FLAG_BIG_MODE_SIZE, 150);
if (!description->SetParameter(cid, bc, DescMainTabGroup))
return TRUE;
}
flags |= DESCFLAGS_DESC::LOADED | DESCFLAGS_DESC::RECURSIONLOCK;
return SUPER::GetDDescription(node, description, flags);
}
I've tried looking through the sdk and forum posts for anything in reference to this functionality and couldn't find anything.
Is there a particular flag that is needed to mimic the Mograph in this way or is the only way to do this with a Scene Hook?
Any help would be greatly appreciated.
John Terenece