summaryrefslogtreecommitdiffstats
path: root/tools/worldbuilder/code/AETemplates/AEWBTriggerButton.mel
blob: ddb862a9831e25e96905c7243d74fc8fdde94ae0 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
global int $gIsItVisibler = 0;

global proc AEWBTriggerButtonNew( string $nodeName )
{
    columnLayout -adj true;

        select $nodeName;
        string $names[] = `ls -sl -o`;

        string $command = "wb_BCB_AttachTriggers(\"" + $names[0] + "\", 0)";

		button -label "Attach Triggers" -command $command WBMakeTriggerButton;

    setParent ..;

    select $names[0];
}


global proc AEWBTriggerButtonReplace( string $nodeName )
{

    select $nodeName;
    string $names[] = `ls -sl -o`;

    string $command = "wb_BCB_AttachTriggers(\"" + $names[0] + "\", 0)";

    button -e -command $command WBMakeTriggerButton;

    select $names[0];
}

global proc AEWBTriggerButtonNewOcclude( string $nodeName )
{
    columnLayout -adj true;

        select $nodeName;
        string $names[] = `ls -sl -o`;

        string $command = "wb_BCB_AttachTriggers(\"" + $names[0] + "\", 0)";

		button -label "Add Occlusion Volume" -command $command WBMakeTriggerButton;

    setParent ..;

    select $names[0];
}

global proc AEWBTriggerButtonReplaceOcclude( string $nodeName )
{
    select $nodeName;
    string $names[] = `ls -sl -o`;

    string $command = "wb_BCB_AttachTriggers(\"" + $names[0] + "\", 0)";

    button -e -command $command WBMakeTriggerButton;

    select $names[0];
}

global proc AEWBTriggerButtonNewVisible( string $nodeName )
{
    columnLayout -adj true;

        select $nodeName;
        string $names[] = `ls -sl -o`;

        string $command = "wb_BCB_AttachTriggers(\"" + $names[0] + "\", 1)";

		button -label "Add Visibler Volume" -command $command WBMakeTriggerButton;

    setParent ..;

    select $names[0];
}

global proc AEWBTriggerButtonReplaceVisible( string $nodeName )
{
    select $nodeName;
    string $names[] = `ls -sl -o`;

    string $command = "wb_BCB_AttachTriggers(\"" + $names[0] + "\", 1)";

    button -e -command $command WBMakeTriggerButton;

    select $names[0];
}

global proc int IsVisibler()
{
	global int $gIsItVisibler;

	return $gIsItVisibler;
}