[Closed] Determine if mouseTrack() is running
Hi guys,
I need to determine if mouseTrack() is running. Every command mode in 3ds Max is stacked internally and can be interrogated by:
toolMode.commandMode
Unfortunately only standard modes like transformations and select are mapped to readable names like #move, #rotate, #scale, and so on. I found out mouseTrack commandMode returns the number 3247. It should be the number registered in the mouseTrack dll and should be static for every 3ds Max version, anyway, I need to confirm it before relaying on such belief.
Follows a simple script to run the test. Evaluate it and as soon as the created Sphere disappear, read what the listener says: “commandMode is mouseTrack” if the code number was right or “commandMode is: XXXX” if it wasn’t recognized. Please post your code number in case of failure.
Thank you very much.
(
local oMesh = convertToMesh (Sphere())
function doTest msg ir obj faceNum shift ctrl alt =
(
if (toolMode.commandMode == 3247) then
format "commandMode is mouseTrack
"
else
format "commandMode is: %
" (toolMode.commandMode)
return #stop
)
mouseTrack on:oMesh trackCallback:doTest
delete oMesh
)
- Enrico
Thank you Johan, knowing it works in 2009, allows me to assume it works for 2008 as well, now I miss a 2010. I guess 32/64 bits don’t make any difference in this case.
Thanks again
- Enrico
Thanks Jonathan, I’m quite sure now the value is static and can rely on it. More confirmations are still welcome.
Keep on coding… See you soon with IC.Shape 2.0
- Enrico