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
    • Recent
    • Tags
    • Users
    • Register
    • Login
    1. Maxon Developers Forum
    2. Gene
    3. Best
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 4
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: CUSTOMGUI_QUICKTAB trigger twice when click

      Sorry for necro'ing the post, I was looking for code references on Quicktabs.

      Regarding Command triggering twice, is it because of the mouse events? mouse up/down
      I print the contents of msg[c4d.BFM_ACTION_INDRAG] inside the Command function for testing.

      • When I click on the Quicktab, the first event returns True, while the second returns False.
      • If I drag over two entries on the Quicktab gadget (click on one entry, then drag to the next entry and let go of the mouse,) Command triggers three times, msg[c4d.BFM_ACTION_INDRAG] returns True the first two times and False for the last one. Also, the first entry returns True for its IsSelected() check on mouse down. After dragging, the the second entry's IsSelected() is True. Second entry's IsSelected() is also true when I let go of the mouse.

      So maybe it was by design, in case the interface needs to update as you drag across entries on the Quicktab gadget. And if you only need to update the gui once (regardless of whether the clicked entry was previously selected or not,) just check if msg[c4d.BFM_ACTION_INDRAG] is False (mouse released.)

      def Command(self, id, msg):
          ## check if Quicktab was clicked, and only process when user is finished clicking
          if id == ID_QUICKTAB_BAR and not msg[c4d.BFM_ACTION_INDRAG]:
              self.RefreshGuiOnQuicktabMouseUp()
      
      
          return True
      
      posted in Cinema 4D SDK
      GeneG
      Gene