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

    ToolData.MouseInput() how to get right mouse click?

    Cinema 4D SDK
    python
    2
    3
    615
    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.
    • J
      JACK0319
      last edited by JACK0319

      Hi,
      I am writing a ToolData plugin,'msg[c4d.BFM_INPUT_CHANNEL]' always returns 1 in MouseInput function, I would like to know how can i get mouse right button event?

      def MouseInput(self, doc, data, bd, win, msg):
          # Retrieves which clicks is currently clicked
          print(msg[c4d.BFM_INPUT_CHANNEL])  # -> 1
      

      Thanks~

      1 Reply Last reply Reply Quote 0
      • i_mazlovI
        i_mazlov
        last edited by

        Hello @JACK0319,

        Please excuse such a delayed reply, somehow this thread slipped away from my table.

        The ToolData plugins are not actually designed to allow overriding the default pre-defined behavior (of right/middle mouse buttons in this specific case). In this specific case the events are not propagated to the ToolData plugins, hence the MouseInput function is not executed at all. I personally would suggest considering using modifiers instead.

        Let me know if you have any further questions.

        Cheers,
        Ilia

        MAXON SDK Specialist
        developers.maxon.net

        J 1 Reply Last reply Reply Quote 0
        • J
          JACK0319 @i_mazlov
          last edited by

          @i_mazlov
          Hi,
          thanks for letting me know that.

          cheers~

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