View Full Version : Please help with fixing a script for Maya 2008


Emil3d
07 July 2008, 03:50 AM
Hi, in previous versions of Maya I used a very nice script created by Yashu (that was his user name). You can find the script in this thread attached in post #11.
http://forums.cgsociety.org/showthread.php?p=3796497&mode=linear#post3796497 (http://forums.cgsociety.org/showthread.php?p=3796497&mode=linear%23post3796497)

The problem is that the script doesn't work in Maya 2008. I wonder if some guru here would help with fixing it to work in Maya 2008.

GiantG
07 July 2008, 07:39 AM
If it just not starting then it's an positioning Problem of the HUD Button

global proc ya_clickDragToggle()
{
selectPref -clickDrag (!`selectPref -q -clickDrag`);
string $label = "CDrag: ";
$label += ((`selectPref -q -clickDrag` == 1) ? "ON" : "OFF");
hudButton -e -l $label ya_clickDragHUD;
}

global proc ya_clickDragToggleHUD()
{
if (!`headsUpDisplay -ex ya_clickDragHUD`)
{
string $label = "CDrag: ";
$label += ((`selectPref -q -clickDrag` == 1) ? "ON" : "OFF");

hudButton
-s 5 -b 1 -ba right -vis 1
-l $label -bw 75
-rc ya_clickDragToggle
-bsh "roundRectangle"
ya_clickDragHUD;
}
}
ya_clickDragToggleHUD;

If the script itself is not working i have to take a deeper look into the code...

Emil3d
07 July 2008, 09:34 PM
It is working nicely now:thumbsup:.
Thanks a lot, very much appreciated.

CGTalk Moderation
07 July 2008, 09:34 PM
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.


1