THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/03/2010 at 04:53, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 11
Platform: Mac OSX ;
Language(s) : C++ ;
---------
I'm using GetDDescription to show/hide interface element.
This works fine when loading the tag and accessing it the very first time.
After that, everything stays visible, although the command flow seem to work correctly.
The method is obviously called twice on each user interaction, once with flags = 0 and one with flags = 17... this seems to be a side effect of the fact that init() is invoked on each parameter change.
Any pointer where to look?
Thanks
Kabe
Bool MyTagDataPlugin::GetDDescription(GeListNode *node, Description *description,LONG &flags;) {
//Load Description
if (!description->LoadDescription(node->GetType())) return FALSE;//Load BaseContainer
BaseContainer *opBC = ((PluginTag* )node)->GetDataInstance();
//Read controlling param
LONG param1 = opBC->GetLong(MYPARAM1, -1);
//Compare with global var
if (param1 !=currentParam1) {
BaseContainer *dir2_BC = description->GetParameterI(DescLevel(MYPARAM2), NULL);
BaseContainer *dir3_BC = description->GetParameterI(DescLevel(MYPARAM3), NULL);
//SET HIDE STATUS
if (dirH_BC&&dirP;_BC) {
if (param1==VAL1) {
dir2_BC->SetBool(DESC_HIDE, FALSE);
dir2_BC->SetBool(DESC_HIDE, TRUE);
}
if (rotaxis==VAL2) {
dir2_BC->SetBool(DESC_HIDE, TRUE);
dir3_BC->SetBool(DESC_HIDE, FALSE);
}
}//Copy current value to global
currentParam1 = param1;
}
//Works, but only on the very first time
flags |= DESCFLAGS_DESC_LOADED;
//call super
return SUPER::GetDDescription(node, description, flags);
}
BTW: This stuff is so fundamental, that the lack of proper examples is a crying shame.
P.S.: This is how it looks like when I format it as CODE - double lines :-/
Bool MyTagDataPlugin::GetDDescription(GeListNode *node, Description *description,LONG &flags;) {
//Load Description
if (!description->LoadDescription(node->GetType())) return FALSE;