Notifications
Clear all

[Closed] Help:batch process upon mouse clicking once

Hi,

is there a way to use Maxscript to define the following batch process upon mouse clicking once? I am using 3Ds Max 2014 version.

  1. If mouse clicks on an object in a scene, the script can show the selected object as well as the face on the object where the mouse is located at.

  2. If mouse clicks on a floating rollout UI and presses a control on the UI, the script can work on the controls instead of the scene (meaning the script should be able to recognize different canvases of the 3Ds Max).

Many thanks in advance!

5 Replies

everything is possible. the most complicated part in this task is implement Mouse Hooks
http://msdn.microsoft.com/en-us/library/windows/desktop/ms632589(v=vs.85).aspx

more specifically: LowLevelMouseProc and MouseProc hooks.

Denis, thanks for the reply. Yes, that’s the point.

In my point of view, seems that 3Ds Max offers very limited support for Maxscript to do lower level work, currently. I am not sure if they would become more opened in future.

Any more ideas?

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

.net is the answer.
there is an example of … don’t really remember… mouse or keyboard hook posted by LO on this forum. this is the way how to do these things

Maybe I’m totally wrong as I’m not sure to understand the goal here, but for me the request is :

1- when mouse hits an object, the target object is then selected, the hitted face is selected and shown via subobjectlevel in modify panel.
2- when a button is pressed on a UI rollout, some actions are done on the other controls of this dialog

So I would propose for 1 :

  • using mouseTool
  • detect the hitted object via some getHitNode() function
  • detect the hitted face of this object via some getNodeFaceFromHit() function
  • show the object’s hitted face via subobjectevel

For request 2 :

  • when button pressed do ( for controls in myRollout do (something) )

But again, maybe I don’t understand the “batch” & “lowlevel” point here.

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

as i understand the idea is to have this node/face monitoring in any mode. the mousetool mode is very limited by doing anything else at the same time.