PDA

View Full Version : Determine if mouseTrack() is running


SyncViewS
09-04-2009, 02:57 PM
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\n"
else
format "commandMode is: %\n" (toolMode.commandMode)

return #stop
)

mouseTrack on:oMesh trackCallback:doTest

delete oMesh
)
- Enrico

JHN
09-04-2009, 09:05 PM
commandMode is mouseTrack
1


Max 2009

-Johan

SyncViewS
09-04-2009, 09:28 PM
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

Jsnyder
09-04-2009, 09:35 PM
commandMode is mouseTrack
1

Ran in max 2010 32bit

SyncViewS
09-04-2009, 10:23 PM
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 :D

- Enrico

cyberdogs7
09-04-2009, 11:24 PM
CG_ALLcommandMode is mouseTrack
1

Max 2010 64b

CGTalk Moderation
09-04-2009, 11:24 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.