summaryrefslogtreecommitdiffstats
path: root/tools/MayaTools/Maya4.0/scripts/AETemplates/AEWBSelectTarget.mel
blob: d1cd4288eeee7bfbd353eb0a847baf634fd71ad3 (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
global proc wb_BCB_SelectTarget( string $nodeName )
{
    select $nodeName;
    string $actNodes[] = `ls -sl -o`;

    string $text = `textField -q -text WBTargetName`;

    print ($text + "\n");

    if ( $text != "" )
    {
        evalEcho ("setAttr " + $actNodes[0] + ".target -type \"string\" \"" + $text + "\"");
    }

    select $actNodes[0];
}

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

        textField -ed true WBTargetName;
        string $command = "wb_BCB_SelectTarget( \"" +  $nodeName + "\" )";
		button -label "Select Target" -command  $command WBSelectTargetButton;

    setParent ..;
}

global proc AEWBTargetSelectReplace( string $nodeName )
{
    textField -e -text "" WBTargetName;
    string $command = "wb_BCB_SelectTarget( \"" +  $nodeName + "\" )";
    button -e -command  $command WBSelectTargetButton;
}