- It depends where you want to know the tag was disabled? It also depends if you want to get triggered by the tag being enabled/disabled, or simply wants to check at given time if tag is enabled/disabled?
If you want to know from within the TagData-derived object the enable state of the tag you can (with a method receiving a GeListNode* node as argument) do:
BaseTag* tag = (BaseTag*)node;
Bool enabled = false;
if (tag)
{
GeData d;
tag->GetParameter(<your tag's ENABLE-id>, d, DESCFLAGS_GET::NONE);
enabled = d.GetBool();
}
...
If you want to get triggered by the change of state then:
Bool YourTagDataDerivedClass::Message(GeListNode* node, Int32 type, void* data)
{
if (type == MSG_DESCRIPTION_POSTSETPARAMETER)
{
DescriptionPostSetValue* postsetval = static_cast<DescriptionPostSetValue*>(data);
if (postsetval && (*postsetval->descid == DescID(<your tag's ENABLE-id>)))
... and same as above: you get the state of the enable-parameter
Bool YourTagDataDerivedClass::SetDParameter(GeListNode* node, const DescID& id, const GeData& t_data, DESCFLAGS_SET& flags)
{
if (!node)
return false;
const Int32& gadgetID = id[0].id;
switch (gadgetID)
{
case <your tag's ENABLE-id>:
enabled = t_data.GetBool();
- I guess the button in front of the "Enable" label is the keyframe button, so you can animate the tag being enabled/disabled over time.