Tool plugin - AM dialog update
- 
 THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED On 31/08/2006 at 21:34, xxxxxxxx wrote: User Information: 
 Cinema 4D Version: 9.102
 Platform: Windows ; Mac OSX ;
 Language(s) :--------- 
 In ToolData::MouseInput(), I have this qualifier key check:// Left Mouse Button + CTRL to Set Operation 
 else if (qualifier == QCTRL)
 {
 operation++;
 if (operation > IPTOP_ROTATE) operation = IPTOP_SELECT;
 data.SetLong(MDATA_IPPTOOL_OPERATION, operation);
 return DrawViews(DA_ONLY_ACTIVE_VIEW|DA_NO_THREAD|DA_NO_ANIMATION);
 }I can set the operation without crashing or other problems, but the Attribute Manager subdialog does not update. Now, if I update with the Tool's AM showing - yay. If it is not showing, crash-boom-bye. So, should I send a message to the subdialog or what? I tried a check such as: if (AMDialog && AMDialog->IsOpen()) ... Still crashes. Hello??? Thanks, 
- 
 THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED On 01/09/2006 at 00:08, xxxxxxxx wrote: I would try one of the "global" message functions. GeSyncMessage look like a good candiate. SpecialEventAdd and EventAdd messages are processed after MouseInput returns. Try sending EVMSG_ASYNCEDITORMOVE, or EVMSG_DOCUMENTRECALCULATED, and handle them in the dialog. 
- 
 THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED On 01/09/2006 at 06:40, xxxxxxxx wrote: I tried calling GeSyncMessage(EVMSG_ASYNCEDITORMOVE), but did not handle it in the dialog. Lemme give that a try and see if the results are better. Thanks, 
- 
 THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED On 01/09/2006 at 12:04, xxxxxxxx wrote: Okay, instead of EVMSG_ASYNCEDITORMOVE (which may cause confusion with drag operations) I am using EVMSG_TOOLCHANGED (seems appropriate). So, from MouseInput(), I do this: // Left Mouse Button + CTRL to Set Operation else if (qualifier == QCTRL) { operation++; if (operation > IPTOP_ROTATE) operation = IPTOP_SELECT; data.SetLong(MDATA_IPPTOOL_OPERATION, operation); GeSyncMessage(EVMSG_TOOLCHANGED); return DrawViews(DA_ONLY_ACTIVE_VIEW|DA_NO_THREAD|DA_NO_ANIMATION); }and in the tool subdialog, I do this: //*---------------------------------------------------------------------------* Bool CoreMessage(LONG id, const BaseContainer& msg) //*---------------------------------------------------------------------------* { if (id == EVMSG_TOOLCHANGED) { LONG operation = tooldata->GetLong(MDATA_IPPTOOL_OPERATION); bSelect->SetToggleState((operation == IPTOP_SELECT)); bTranslate->SetToggleState((operation == IPTOP_TRANSLATE)); bScale->SetToggleState((operation == IPTOP_SCALE)); bRotate->SetToggleState((operation == IPTOP_ROTATE)); } return TRUE; }That does the trick. 