THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/11/2004 at 21:58, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.503
Platform: Windows ;
Language(s) : C++ ;
---------
I want to perform an action when one of my plugin tags is deleted from the document. There do not seem to be any Messages sent to the TagData when deletion occurs, so I stuck some code in Free() as shown below:
void MorphMixerTag::Free(GeListNode *node)
{
GePrint("MorphMixerTag.Free");
// Ask user whether or not to reset morphs on delete
if (QuestionDialog(IDS_MMT_QUESTION))
{
// Get Polygonal Object receiving morphs, return if not
opBC = ((BaseTag* )node)->GetDataInstance();
lastIndex = opBC->GetLong(MORPHMIXER_LASTINDEX);
// Set slider to 0.0
for (index = MORPHMIXER_MORPHOFFSET; index != lastIndex; index++)
{
opBC->SetReal(index, 0.0);
DirectlyMorph();
}
}
if (morphs) GeFree(morphs);
if (desc) Description::Free(desc);
}
The operation after a TRUE QuestionDialog return doesn't appear to be performed and I get several more QuestionDialogs when exiting C4D. My suspicion is that these are from Undo copies being deleted since there is only one having been deleted (?).
Is this possible? If not, I already have alternative methods in place.
Thanks,
Robert