On 01/02/2014 at 17:58, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 13,14,15
Platform: Windows ;
Language(s) : C++ ;
---------
Hi, I try to change a real slider's max value when the user changes the status of a checkbox. But after I have changed the value, t he slider behaves strange. The normal real real editor box behaves normal.
Bool MyTag::GetDDescription (GeListNode* node, Description* description, DESCFLAGS_DESC &flags)
{
DescID cid = DescLevel(MYTAG_REAL_VALUE, DTYPE_REAL, 0);
BaseContainer bc = GetCustomDataTypeDefault(DTYPE_REAL);
bc.SetLong(DESC_CUSTOMGUI, CUSTOMGUI_REALSLIDER);
bc.SetLong(DESC_UNIT, DESC_UNIT_PERCENT);
bc.SetLong(DESC_MAX, 100);
bc.SetLong(DESC_MAXSLIDER, 100);
bc.SetLong(DESC_MIN, 0);
bc.SetLong(DESC_MINSLIDER, 100);
bc.SetString(DESC_NAME, "Foo");
description->SetParameter(cid, bc, DescLevel(0));
}
The code is somewhat simplified.
I am sure I do something wrong here. Because I just want to change a specific parameter. But if I do not include the " bc.SetLong(DESC_CUSTOMGUI, CUSTOMGUI_REALSLIDER)", no slider appears.
So I definitely do something wrong, since the slider already is defined in the RES file, I just want to alter the MAX values for both the Real and for the Slider.
Anyone who knows how to do this correctly?