blob: ab9985808c9d52cd2f35af52fc84abd916a54677 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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;
}
}
|