C++ equivalent to Maxscript's mouseTrack?


#1

Is there any similar function to mouseTrack in the SDK to move while snapping an object?

Maxscript help: https://help.autodesk.com/view/MAXDEV/2021/ENU/?guid=GUID-0A4CD125-5CA0-42DA-B2D6-B8FDF511CCE8

Thanks!


#2

have a look at mousetrak.cpp in the SDK samples, looks like it just uses a command mode.

/* mouseTrack() function implementation
*

  • Adds a new function, mouseTrack(), that can be used to script mouse-driven
  • interaction in MAX. It implements a new MAX command mode that does the
  • mouse tracking. Basic operation allows the specifying of a callback
  • function that is called as the mouse is manipulated and, in particular,
  • can be conditioned to track over the surface of a mesh giving back normal, face number,
  • etc., for implementing MAYA Artisan-like features.
  • John Wainwright, 1998
    */

#3

Thank you searching for “moustrak.cpp” (actual name of the file) was not so intuitive :grin: