On 16/10/2017 at 06:54, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R17
Platform: Windows ;
Language(s) : C++ ;
---------
Hello.
I add a BitmapButton parameter in a NodeData's GetDDescription(....).
Here is the code:
const DescID* single_id = description->GetSingleDescID();
DescID custom_button = DescLevel(param_id, CUSTOMDATATYPE_BITMAPBUTTON, 0);
if (!single_id || custom_button.IsPartOf(*single_id, NULL)) {
BaseContainer cont = GetCustomDataTypeDefault(CUSTOMDATATYPE_BITMAPBUTTON);
cont.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_BITMAPBUTTON);
cont.SetBool(BITMAPBUTTON_BUTTON, true);
cont.SetBool(BITMAPBUTTON_TOGGLE, true);
if (resource_image_on > 0)
cont.SetInt32(BITMAPBUTTON_ICONID1, resource_image_on);
if (resource_image_off > 0)
cont.SetInt32(BITMAPBUTTON_ICONID2, resource_image_off);
description->SetParameter(custom_button, cont, group_id );
}
How can I set the initial state of that bitmap button ?
Thank you.