summaryrefslogtreecommitdiffstats
path: root/tools/MayaTools/Maya4.0/scripts/others/wb_locator.mel
diff options
context:
space:
mode:
authorSvxy <aidan61605@gmail.com>2023-05-31 23:31:32 +0200
committerSvxy <aidan61605@gmail.com>2023-05-31 23:31:32 +0200
commiteb4b3404aa00220d659e532151dab13d642c17a3 (patch)
tree7e1107c4995489a26c4007e41b53ea8d00ab2134 /tools/MayaTools/Maya4.0/scripts/others/wb_locator.mel
downloadThe-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.gz
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.bz2
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.lz
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.xz
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.zst
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.zip
Diffstat (limited to 'tools/MayaTools/Maya4.0/scripts/others/wb_locator.mel')
-rw-r--r--tools/MayaTools/Maya4.0/scripts/others/wb_locator.mel71
1 files changed, 71 insertions, 0 deletions
diff --git a/tools/MayaTools/Maya4.0/scripts/others/wb_locator.mel b/tools/MayaTools/Maya4.0/scripts/others/wb_locator.mel
new file mode 100644
index 0000000..0b46abb
--- /dev/null
+++ b/tools/MayaTools/Maya4.0/scripts/others/wb_locator.mel
@@ -0,0 +1,71 @@
+global float $gWB_Offset = 0;
+
+global proc wb_BCB_CreateLocator( string $type )
+{
+ //Start the Locator context...
+ if ( ! `contextInfo -exists LocatorCtx` )
+ {
+ LocatorContext LocatorCtx;
+ }
+
+ WB_SetLocatorType($type);
+
+ setToolTo LocatorCtx;
+}
+
+global proc wb_MCB_SnapLocatorOptions()
+{
+ global float $gWB_Offset;
+
+ if ( `window -exists wb_OptionWindow` ) deleteUI wb_OptionWindow;
+
+ window -title "Snap Locator Options" wb_OptionWindow;
+
+ columnLayout;
+
+ rowLayout -nc 2;
+
+ text -label "Offset (M):";
+
+ floatField -min -10.0 -max 10.0 -value $gWB_Offset -cc ("$gWB_Offset = #1");
+
+ setParent ..;
+
+ button -label "snap locator" -command "WB_SnapLocator( $gWB_Offset )";
+
+ setParent ..;
+
+ showWindow;
+}
+
+global proc wb_BCB_AttachTriggers( string $name, int $isVisibler )
+{
+ global int $gIsItVisibler;
+
+ $gIsItVisibler = $isVisibler;
+
+ //Start the Trigger context...
+ if ( ! `contextInfo -exists TriggerCtx` )
+ {
+ TriggerContext TriggerCtx;
+ }
+
+ select $name;
+
+ WB_SelectObject( $name );
+
+ setToolTo TriggerCtx;
+}
+
+global proc wb_LocatorCleanup()
+{
+ if ( `contextInfo -exists LocatorCtx` )
+ {
+ deleteUI -tc LocatorCtx;
+ }
+
+ if ( `contextInfo -exists TriggerCtx` )
+ {
+ deleteUI -tc TriggerCtx;
+ }
+} \ No newline at end of file