PDA

View Full Version : scriptjob or other technique for continuously calling a proc during drag


YourDaftPunk
01-25-2009, 09:46 PM
I ran into an interesting issue trying to solve the problem of restraining an object's movement to inside a sphere.

Basically I would like to know if there is a way to call a mel procedure continuously as an object is dragged. If I attach a script job to the translate attribute, the function is only called when the object is released at the end of the translation. Ex:scriptJob -attributeChange "pCube1.translate" controlBoundryCheck; Maybe I'm going about this wrong and script jobs are not the answer. I'm sure there is a more complicated way to solve the problem using the API. I would find this behavior useful for many tools beyond solving the problem mentioned above, so if anyone has ideas, your help would be appreciated.

Thanks.
-shawn

YourDaftPunk
01-26-2009, 01:21 AM
manipMoveContext allows a command to be called when the move tool is first entered or exited. In Maya 2009 it seems you can also call a command at the beginning or end of a drag, but not continuously during the move...

So close!

CGTalk Moderation
01-26-2009, 01:22 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.