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

    Is there any way to get MMB wheel scrolling in viewport?

    Cinema 4D SDK
    c++ python
    2
    2
    527
    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.
    • L
      LingZA
      last edited by

      Is there any way to stop MMB wheel to zoom the camera then get MMB wheel scrolling in viewport in Description Tool?
      I need to scroll the MMB wheel in the viewport to change my tool's params?
      For example, shift + scroll MMB wheel to increase the value.

      I know how to get MMB wheel scrolling in GeDialog like in asynctest.cpp. But MMB wheel scrolling can not got in MouseInput() in tools (ToolData, DescriptionToolData).

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @LingZA
        last edited by

        Hey @LingZA,

        Thank you for reaching out to us. There are multiple questions in this topic, which always makes things tricky to answer.

        • Is there any way to stop MMB wheel to zoom the camera?
        • I need to scroll the MMB wheel in the viewport to change my tool's params?
        • Is there any way to get MMB wheel scrolling in viewport?

        In general, Cinema 4D has no input device control & emulation layer, so you cannot intercept an input device from sending (stop the mouse wheel to zoom) or emulate inputs (get the mouse wheel scrolling).

        You can get the state of an input device. For MMB that would be the GUI message BFM_INPUT with BFM_INPUT_DEVICE being BFM_INPUT_MOUSE and BFM_INPUT_CHANNEL being BFM_INPUT_MOUSEMIDDLE. When you fail to read BFM_INPUT_MOUSEMIDDLE in your plugin, please share executable code, so that we can reproduce the problem.

        When necessary, you can send code confidentially to us via sdk_support(at)maxon(dot)net.

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

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