On 02/08/2014 at 07:13, xxxxxxxx wrote:
Cinema 4D Version: 14, 15
Platform: Windows ;
Language(s) : C++ ;
I am having trouble getting cycle buttons to work in a generator plugin.
This is what I added in the res file
The cycle list appears fine in the AM.
The problem is when I am try to access the buttons. This is the code that I am using:
Bool MYOBJECT::Message(GeListNode *node, LONG type, void *data)
DescriptionCommand *dc = (DescriptionCommand* ) data;
if (dc->id.id == MYOBJECT_CYCLE)
BaseContainer *bc = ((BaseObject* )node)->GetDataInstance();
if (!bc) return FALSE;
LONG item = bc->GetLong(MYOBJECT_CYCLE);
Nothing gets printed. If I try to print dc- >id.id I don't get anything.I am presuming that MYOBJECT_CYCLE is not getting recognized in the first place.
Anyone can shed a light on what I might be doing wrong?
On 02/08/2014 at 10:54, xxxxxxxx wrote:
MSG_DESCRIPTION_COMMAND only works with Buttons. You should check using MSG_DESCRIPTION_CHECKUPDATE.
DescriptionCheckUpdate* dcu = static_cast<DescriptionCheckUpdate*>(data);
BaseContainer* bc = op->GetDataInstance();
LONG id = (*(dcu->descid)).id;
LONG item = ...
On 02/08/2014 at 11:51, xxxxxxxx wrote:
Works like a charm. Thanks a lot (again) Robert!