Thank you guys for quick reply.
But I was probably not clear enough with the question.
I do understated the concept of setting panel description via GetDDescription() callback.
I already did the checks for whether it is request for full description of just single id.
As it is listed in the example below (it is member function of C4dControls class from previous snippet π
void C4dControls::AddIntChoice(int id, int gid, const String& name, const BaseContainer& items)
{
const DescID cid = DescLevel(id, DTYPE_LONG, 0);
//---------------------------------------------------------------------
if (ex_descr && (!ex_singleid || cid.IsPartOf(*ex_singleid, nullptr)) )
{
BaseContainer bc = GetCustomDataTypeDefault(DTYPE_LONG);
//---------------------------------------------
bc.SetInt32 (DESC_CUSTOMGUI, ID_QUICKTABSRADIO_GADGET);
bc.SetString(DESC_NAME, name);
bc.SetInt32 (DESC_SCALEH, 1);
// animate OFF
bc.SetInt32 (DESC_ANIMATE, DESC_ANIMATE_OFF);
//---------------------------------------------
bc.SetContainer(DESC_CYCLE, items);
//---------------------------------------------
ex_descr->SetParameter(cid, bc, DescLevel(gid));
}
}
But it is still calling to rewrite each control description several times after any event in GUI.
What confuses me the most, is that each series of calls is with the different pointer to description (Description* description)
For example there are five different pointers to description when ToolData::GetDDescription() is executed for the same event. (after mouse click into attribute manager)
Is this the way how it really works?
There are more versions of description for the same panel, and all of them have to be initialized repeatedly after each event?
Thanks!
Viktor