summaryrefslogtreecommitdiffstats
path: root/tools/MayaTools/Maya4.0/scripts/others/wb_splines.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_splines.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_splines.mel')
-rw-r--r--tools/MayaTools/Maya4.0/scripts/others/wb_splines.mel46
1 files changed, 46 insertions, 0 deletions
diff --git a/tools/MayaTools/Maya4.0/scripts/others/wb_splines.mel b/tools/MayaTools/Maya4.0/scripts/others/wb_splines.mel
new file mode 100644
index 0000000..ab99858
--- /dev/null
+++ b/tools/MayaTools/Maya4.0/scripts/others/wb_splines.mel
@@ -0,0 +1,46 @@
+global int $gSplineCompleteCB = -1;
+
+global proc wb_MCB_CreateCameraPath()
+{
+ global int $gSplineCompleteCB;
+
+ if ( !`contextInfo -exists CameraSplineCtx` )
+ {
+ curveCVCtx -degree 3 -me false -un true CameraSplineCtx;
+ }
+ else
+ {
+ string $currentCtx = `currentCtx`;
+
+ if ( $currentCtx == "CameraSplineCtx" )
+ {
+ ctxCompletion;
+
+ wb_CB_SplineComplete();
+ }
+ }
+
+ setToolTo CameraSplineCtx;
+
+ $gSplineCompleteCB = `scriptJob -ro 1 -p "WorldBuilder" -e "ToolChanged" wb_CB_SplineComplete`;
+}
+
+global proc wb_CB_SplineComplete()
+{
+ WB_SplineComplete();
+}
+
+global proc wb_SplinesCleanup()
+{
+ global int $gSplineCompleteCB;
+
+ if ( $gSplineCompleteCB != -1 )
+ {
+ scriptJob -k $gSplineCompleteCB;
+ }
+
+ if ( `contextInfo -exists CameraSplineCtx` )
+ {
+ deleteUI -tc CameraSplineCtx;
+ }
+}