@ferdinand
Hi Ferdinand,
Thank you for your detailed reply, and apologies for making the original post too broad. I have narrowed this down to one SDK question.
Our C++ plugin starts a modal G/R/S transform from the keyboard via SceneHook/ToolData, with no mouse button held. We currently sample GetCursorPos() and use SetCursorPos() for viewport-edge wrapping.
In a reproducible Windows 11 high-refresh-rate case, our trace shows the following sequence:
- A mouse sample at (2077, 189) triggers a warp to (68, 189).
SetCursorPossucceeds and an immediateGetCursorPosreadback confirms (68, 189).- After the viewport update, the OS cursor is observed at (2109, 197).
- The next callback reads (2192, 215), so subtracting the stored warp position yields a false (+2124, +26) motion delta.
We understand from your reply that GetInputEvent() can return stale information, so switching to it blindly would not solve this.
Is there a supported Cinema 4D C++ SDK input callback or API that can supply mouse movement during a keyboard-initiated, button-free modal interaction with documented semantics that distinguish real user motion from SetCursorPos()-related repositioning or delayed events?
If no such distinction is guaranteed by the SDK, that information would also be very helpful; we want to avoid taking ownership of Cinema 4D's window event loop.
Thank you again,
hey2495