-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathinstall.mel
More file actions
45 lines (43 loc) · 1.04 KB
/
Copy pathinstall.mel
File metadata and controls
45 lines (43 loc) · 1.04 KB
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
/*
# Author: Godfrey Huang
# Email: godfrey.huang@udecg.com
# Website: www.udecg.com
#
# Created by Godfrey Huang on 2015-11-01.
# Copyright (c) 2014 UDECG.COM. All rights reserved.
*/
global proc tempProc ()
{}
global proc string tellMeWhere()
{
string $place=`whatIs tempProc`;
string $buffer[];
$numTokens = `tokenize $place ":" $buffer`;
$place=strip ($buffer[1]+":"+$buffer[2]);
string $buffer1[];
$numTokens = `tokenize $place "/" $buffer1`;
$place=$buffer1[0];
string $os = `about -operatingSystem`;
for ($i=1;$i<($numTokens-1);$i++)
{
if($os=="mac")
{$place="/"+$place+"/"+$buffer1[$i];}
else
{$place=$place+"/"+$buffer1[$i];}
}
if(`gmatch $place "*invoke*"`)
{$place=`substring $place 1 (size($place)-7)` ;}
else
{$place=($place+"/scripts");}
return $place;
}
global proc install()
{
string $scriptsPath = `tellMeWhere`;
string $pyStr = "import sys\n";
$pyStr += "sys.path.append(\""+$scriptsPath+"\")\n";
$pyStr += "import dm2scSetup\n";
$pyStr += "dm2scSetup.main()\n";
python($pyStr);
}
install();