I am playing around with some MEL script and the dragger context, but I can consistently crash maya within seconds while running the script.
I tried to check my script back to its basics and I can reproduce the problem with the default dragger Context stock example if I specify the draggerContext with the -space "world" attribute.
Also, I changed the example so it actually creates a locator at the world coordinates returned with the context.
It seems that it's actually the line that breaks maya, but I have no clue why.
here is the script (default mel example with the 2 changes I mentionned above)
// Procedure called on press
global proc sampleContextPress()
float $pressPosition =
draggerContext -query -anchorPoint sampleContext;
print ("Press: " + $pressPosition + " " + $pressPosition + " "
+ $pressPosition + "
// Procedure called on drag
global proc sampleContextDrag()
float $dragPosition =
draggerContext -query -dragPoint sampleContext;
int $button =
draggerContext -query -button sampleContext;
string $modifier =
draggerContext -query -modifier sampleContext;
print ("Drag: " + $dragPosition + " " + $dragPosition + " "
+ " Button is " + $button + " Modifier is " + $modifier + "
spaceLocator -p $dragPosition $dragPosition $dragPosition;
// string $message = ($dragPosition + ", " + $dragPosition);
// draggerContext -edit -drawString $message sampleContext;
// Create the dragger context
// Set current tool to use the sample context created.
// Results can be seen by dragging mouse in main window
if I run this in the script editor and scrub a viewport some, it will crash maya within moment.
if I comment out -space "world" it will work fine. if I leave it be but comment the spaceLocator line instead it will work fine also.
(note: also, I am working with a windows 7 setup, could this have any effect?)
I would appreciate any help on this matter