THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/07/2009 at 21:41, xxxxxxxx wrote:
Found it with a little help from an old Samir thread:
First, GetDParameter() needs to be done like this (note the decrement!!!) :
> // NodeData.GetDParameter \> //\*---------------------------------------------------------------------------\* \> Bool GreeblerObj::GetDParameter(GeListNode\* node, const DescID& id, GeData& t_data, LONG& flags) \> //\*---------------------------------------------------------------------------\* \> { \> if (!node) return FALSE; \> switch (id[0].id) \> { \> // BitmapButtons \> case GREEBLER_INFO: \> case GREEBLER_BITMAP_CUBE: \> case GREEBLER_BITMAP_T: \> case GREEBLER_BITMAP_L: \> case GREEBLER_BITMAP_C: \> case GREEBLER_BITMAP_H: \> case GREEBLER_BITMAP_D: \> case GREEBLER_BITMAP_BOX: \> case GREEBLER_BITMAP_CYLINDER: \> case GREEBLER_BITMAP_RING: \> case GREEBLER_BITMAP_BARS: \> { \> BitmapButtonStruct bbs(static_cast<PluginObject\*>(node), id, bm_dirty); \> t_data = GeData(CUSTOMDATATYPE_BITMAPBUTTON, bbs); \> flags |= DESCFLAGS_PARAM_GET; \> --bm_dirty; \> } \> default: \> break; \> } \> return SUPER::GetDParameter(node, id, t_data, flags); \> }
When one of the two buttons is clicked, a MSG_DESCRIPTION_COMMAND is sent to NodeData::Message() wherein I call this (note the increment!!!) :
> // GreeblerObj.SelectShapes \> //\*---------------------------------------------------------------------------\* \> void GreeblerObj::SelectShapes(BaseObject\* op, const Bool& state) \> //\*---------------------------------------------------------------------------\* \> { \> BaseContainer\* bc = op->GetDataInstance(); \> bc->SetBool(GREEBLER_SHAPE_CUBE, state); \> ++bm_dirty; \> bc->SetBool(GREEBLER_SHAPE_T, state); \> ++bm_dirty; \> bc->SetBool(GREEBLER_SHAPE_L, state); \> ++bm_dirty; \> bc->SetBool(GREEBLER_SHAPE_C, state); \> ++bm_dirty; \> bc->SetBool(GREEBLER_SHAPE_H, state); \> ++bm_dirty; \> bc->SetBool(GREEBLER_SHAPE_D, state); \> ++bm_dirty; \> bc->SetBool(GREEBLER_SHAPE_BOX, state); \> ++bm_dirty; \> bc->SetBool(GREEBLER_SHAPE_CYLINDER, state); \> ++bm_dirty; \> bc->SetBool(GREEBLER_SHAPE_RING, state); \> ++bm_dirty; \> bc->SetBool(GREEBLER_SHAPE_BARS, state); \> ++bm_dirty; \> }
bm_dirty is a LONG declared as a class member and initialized in Init() to 0.