Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Tool plugin - AM dialog update

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 323 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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,

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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,

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            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. 🙂

            1 Reply Last reply Reply Quote 0
            • First post
              Last post