Updated
This commit is contained in:
@ -0,0 +1,32 @@
|
||||
string $currentShelf = `tabLayout -query -selectTab $gShelfTopLevel`;
|
||||
setParent $currentShelf;
|
||||
string $asInstallScriptLocation=`asInstallScriptLocation`;
|
||||
string $scriptName="picker";
|
||||
string $sourceFile=$asInstallScriptLocation+$scriptName+".mel";
|
||||
string $command="source \""+$sourceFile+"\"";
|
||||
string $icon=$asInstallScriptLocation+"pickerFiles/icons/picker.png";
|
||||
if (!`file -q -ex $sourceFile`)
|
||||
error ("Something went wrong, can not find: \""+$sourceFile+"\"");
|
||||
shelfButton
|
||||
-command $command
|
||||
-annotation $scriptName
|
||||
-label $scriptName
|
||||
-image $icon
|
||||
-image1 $icon
|
||||
-sourceType "mel"
|
||||
;
|
||||
print ("\n// "+$scriptName+" has been added to current shelf.\n");
|
||||
|
||||
global proc asInstallScriptLocator (){}
|
||||
|
||||
global proc string asInstallScriptLocation ()
|
||||
{
|
||||
string $whatIs=`whatIs asInstallScriptLocator`;
|
||||
string $fullPath=`substring $whatIs 25 999`;
|
||||
string $buffer[];
|
||||
int $numTok=`tokenize $fullPath "/" $buffer`;
|
||||
int $numLetters=size($fullPath);
|
||||
int $numLettersLastFolder=size($buffer[$numTok-1]);
|
||||
string $scriptLocation=`substring $fullPath 1 ($numLetters-$numLettersLastFolder)`;
|
||||
return $scriptLocation;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user