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

    BFM_INPUT_DOUBLECLICK in GeUserArea...

    Cinema 4D SDK
    c++ classic api macos
    2
    7
    796
    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.
    • fwilleke80F
      fwilleke80
      last edited by fwilleke80

      Hi there,

      a classic topic that just came up again...

      In a GeUserArea, we try to catch a double click. It used to work fine, the code has worked for years. But recently, I find it very difficult to trigger a double click event. That even happens in old builds of the plugin that used to work as expected (I tested back to R16).

      Bool MyImageArea::InputEvent(const BaseContainer& msg)
      {
      	if (msg.GetInt32(BFM_INPUT_DEVICE) == BFM_INPUT_MOUSE)
      	{
      		if (msg.GetInt32(BFM_INPUT_CHANNEL) == BFM_INPUT_MOUSELEFT)
      		{
      			if (msg.GetBool(BFM_INPUT_DOUBLECLICK))
      			{
      				// Do stuff here...
      				EventAdd();
      				return TRUE;
      			}
      		}
      	}
      	return FALSE;
      }
      

      Things I noticed:

      • I have to take care the mouse does not move at all during the double click
      • I often have to click three or four times

      Debugging, I can see that if (msg.GetBool(BFM_INPUT_DOUBLECLICK)) is called, but rarely returns true, however fast I try to click.

      It seems that the problem is not present on Windows, but it is on macOS. Maybe something with the mouse handling in macOS changed in recent OS updates?
      What might be the reason? And how can I improve responsiveness to double clicks?

      Thanks for advice!

      Cheers,
      Frank

      www.frankwilleke.de
      Only asking personal code questions here.

      1 Reply Last reply Reply Quote 0
      • ManuelM
        Manuel
        last edited by

        Hello,

        Fowarding this to our devs. I'll be back when i got information. 🙂

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

        1 Reply Last reply Reply Quote 0
        • fwilleke80F
          fwilleke80
          last edited by

          Thank you!

          www.frankwilleke.de
          Only asking personal code questions here.

          1 Reply Last reply Reply Quote 0
          • ManuelM
            Manuel
            last edited by Manuel

            @fwilleke80 said in BFM_INPUT_DOUBLECLICK in GeUserArea...:

            That even happens in old builds of the plugin that used to work as expected (I tested back to R16).

            to remove any kind of guessing here, you are having this issue, using your plugins compiled for the R16 using it with the R16 version on OSX Mojave ?

            More information on what c4d and osx version you are using could help.

            Cheers,
            Manuel

            MAXON SDK Specialist

            MAXON Registered Developer

            1 Reply Last reply Reply Quote 0
            • fwilleke80F
              fwilleke80
              last edited by fwilleke80

              Environment used to build for R16:

              • MacBook Pro 17" Early 2011
              • Xcode 5.1
              • OSX Yosemite 10.10.5
              • Cinema 4D R16.021 (Build RB111778)

              For testing, I used the binary built on the above mentioned system and ran it in R16 on my iMac with macOS High Sierra 10.13.6. The exact Cinema version is 16.011 (RB 107079), as I couldn't get updates for R16 anymore. In this test scenario, double clicks don't work reliably, as described in the initial post. Using it on the old MacBookPro used for building, the double clicks work fine.

              www.frankwilleke.de
              Only asking personal code questions here.

              1 Reply Last reply Reply Quote 0
              • ManuelM
                Manuel
                last edited by

                hello,

                if i'm correct, you have access to the Beta.
                If so, my suggestion here is to open a BL entry and provide your tools so we can reproduce it.
                You will be able to communicate directly if needed.

                Cheers,
                Manuel

                MAXON SDK Specialist

                MAXON Registered Developer

                1 Reply Last reply Reply Quote 0
                • fwilleke80F
                  fwilleke80
                  last edited by

                  OK, thank you!

                  www.frankwilleke.de
                  Only asking personal code questions here.

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