PDA

View Full Version : mouse command


facelaunch
01-14-2006, 01:09 PM
Hi Guys,

I am trying to figure out the mel script that would be used for using the mouse for controlling the movement of an object like a cursor, while still in Maya's "raw form" (grid form). All the mel script I need is for three degrees of freedom in the x, y, z planes, but I'm not sure where to start. I am a newbie with the mel script.

So, when I click the object there is mel script that makes it a cursor. If I could find the mel script that makes this happen, that would be great! This is needed without playing the animation.

Can anyone help please?

panand
01-20-2006, 08:26 PM
The best place to start, is check out other scripts that control mouse movements. For example, in the Maya install directory, there is a directory called scripts. Under that, there is a directory called live. Check out mlDragTrackedPoint.mel

This has functions for doDrag, onRelease, etc

You may be able use code snippets from this to suit you needs. However, if you plan on changing the actual bitmap for the cursor, you may need to use C++ and the maya devkit, not a mel command.

There are good examples of this in the devkit, check out marqueeTool.cpp

hope that helps.


Hi Guys,

I am trying to figure out the mel script that would be used for using the mouse for controlling the movement of an object like a cursor, while still in Maya's "raw form" (grid form). All the mel script I need is for three degrees of freedom in the x, y, z planes, but I'm not sure where to start. I am a newbie with the mel script.

So, when I click the object there is mel script that makes it a cursor. If I could find the mel script that makes this happen, that would be great! This is needed without playing the animation.

Can anyone help please?

tciny
01-22-2006, 02:49 AM
afaik MEL doesn't allow you do things like that (although you might be able to fake it). If you really want to do somthing like that you'll most likely have to write something called a context.
A context would be: the move tool, scale tool, the modifier you get after extruding etc.
It's what you see and modifiy as a user within the viewport. The nice thing about is, that you can use any OGL commands you like to draw on the screen.
This unfortunately requires you to use the Maya API (C++). Also, it uses a pretty weird and unnessecarily complicated architecture I'd say, so you should expect this to be a little more difficult than just writing your average DG node or MEL command.

You can use the moveManip project in the devkit for reference.

CGTalk Moderation
01-22-2006, 02:49 AM
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.