User avatar
By deadalvs
#256898
hi ...

i was tired of putting duplicates of my scripts in maya's default scripts folder, so i wrote a little script that lets me source the scripts from any directory.
like this i can store all my scripts on a shared network folder and keep the maya installations clear.

the script actually checks the dir for all .mel scripts and sources ALL that is found.
simply put the code to a shelf button or in the userSetup.mel file.

string $path = "enter path here";

string $FileArray[] = `getFileList -folder $path`;
for ($eachFile in $FileArray){
//print ($eachFile + "\n");
string $buffer[];
$numTokens = `tokenize $eachFile "." $buffer`;
if ($buffer[(size($buffer))-1] == "mel"){
string $FullPath = $path + $buffer[0] + ".mel";
eval ("source " + "\"" + $FullPath + "\"");
}
}
i hope someone can use this too...

Hi! I have looked for the answer to this but so fa[…]

Settings do not stick

Quick update - if you save the viewport again (in […]

I don't understand why it is so difficult to have[…]

Backplate rendering - reflections

Ok, thanks, so Arnold can do https://answers.arnol[…]