THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/11/2004 at 06:33, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.5+
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
---------
Howdy,
I'm trying to add a button with GetDDescription() but it does not appear. Here is the code:
Bool TesterPlugin::GetDDescription(GeListNode *node, Description *description, LONG &flags;)
{
BaseTag *tag = (BaseTag* )node;
if (!description->LoadDescription(node->GetType())) return FALSE;
LONG i,offsetCount = tag->GetData().GetLong(OFFSET_COUNT);
for (i=1; i<offsetCount; i++)
{
BaseContainer bc2 = GetCustomDataTypeDefault(DTYPE_BUTTON);
bc2.SetString(DESC_NAME," Set Offset ");
if (!description->SetParameter(DescLevel(SET_OFFSET_A+i,DTYPE_BUTTON,0),bc2,DescLevel(ID_OFFSETS)))
{
return FALSE;
GePrint(LongToString(SET_OFFSET_A+i));
}
}
flags |= DESCFLAGS_DESC_LOADED;
return TRUE;
}
I added the GePrint() to see if it gets created but it doesn't. I've done a search on the forum for DTYPE_BUTTON and only found one example, by Samir using a bitmap button, and the only significant difference I can see is with the DescLevel(). I also tried this: DescLevel(SET_OFFSET_A+i) instead of this: DescLevel(SET_OFFSET_A+i,DTYPE_BUTTON,0) and it made no difference.
What have I done wrong?
Thanks in advance for any help.
Adios,
Cactus Dan