THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/05/2011 at 11:41, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 12
Platform: Windows ;
Language(s) : C++ ;
---------
Hi guys,
I'm having trouble with Multi-Selection buttons returning the correct results.
I'm trying to get a print result only when the multi-button is changed to a specific option.
Here is my code:
EXECUTIONRESULT MyTag::Execute(BaseTag *tag, BaseDocument *doc, BaseObject *op, BaseThread *bt, LONG priority, EXECUTIONFLAGS flags)
{
if (tag->GetData().GetBool(MYBOX)) // if the MYBOX checkbox attribute is enabled
{
GePrint("CheckBox is enabled"); // This Works fine
}
if (tag->GetData().GetLong(MULTIBUTTON, TWO)) // if the multi-button is set to this mode
{
GePrint("Option Two Selected"); //<--- This Does not work!! It always prints.. no matter what option is selected!!
}
return EXECUTIONRESULT_OK;
}
Here is what's in my .res file:
CONTAINER Tmytag
{
NAME Tmytag;
INCLUDE Texpression;
INCLUDE Obase;
GROUP ID_TAGPROPERTIES
{
COLUMNS 1;
BOOL MYBOX { }
GROUP
{
COLUMNS 1;
LINK MY_LINK
{
ACCEPT { Obase; }
REFUSE { Osky; Oforeground; }
}
SEPARATOR { LINE; }
BUTTON BUTTON1 {}
BUTTON BUTTON2 {}
//BUTTON BUTTON2 {HIDDEN;} //Use this to hide the button if desired
SEPARATOR { LINE; }
REAL MYSLIDER { UNIT PERCENT; MIN 0.0; MAX 100.0; MINSLIDER 0.0; MAXSLIDER 10000.0; CUSTOMGUI REALSLIDER; }
REAL MYNUMERIC {MIN 0.0; MAX 100.0; STEP 1;} //STEP controls the amount the values increase using the arrows
STRING MYTEXTBOX {ANIM OFF; } //ANIM OFF hides the set key option from the user
LONG MULTIBUTTON
{
CYCLE
{
ONE;
TWO;
}
}
}
}
}
Can anyone tell me what I'm doing wrong?
-ScottA