description SetParameter
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 01/12/2005 at 09:52, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.507
Platform: Windows ;
Language(s) : C++ ;---------
Hi,it seems to me, that there is a bug in the SetParameter function of the description lib.
Setting default values to the description basecontainer (DESC_DEFAULT) have no effect. This is also true for the lookatcamera sdk example.
bc2 = GetCustomDataTypeDefault(DTYPE_BOOL); bc2.SetLong(DESC_CUSTOMGUI, CUSTOMGUI_BOOL); bc2.SetString(DESC_NAME, "Activate"); bc2.SetBool(DESC_DEFAULT, TRUE); //<< doesn't work if(!description->SetParameter(DescLevel(id, DTYPE_BOOL, 0), bc2, DescLevel(grpid))) return FALSE;
I also have problems to set the DESC_ACCEPT parameter for baselist links, but in this case I'm not sure to use the right code:
bc2 = GetCustomDataTypeDefault(DTYPE_BASELISTLINK); bc2.SetLong(DESC_CUSTOMGUI, CUSTOMGUI_LINKBOX); bc2.SetString(DESC_NAME, "Name"); dbc = bc2.GetContainerInstance(DESC_ACCEPT); if (dbc) dbc->SetString(5123, "Obone"); dbc = bc2.GetContainerInstance(DESC_REFUSE); if (dbc) dbc->SetString(5155, "Obase"); if(!description->SetParameter(DescLevel(id, DTYPE_BASELISTLINK, 0), bc2, DescLevel(grpid))) return FALSE;
The baselink box will accept all kind of objects instead of bones only.