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
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
