using mels "source" command can be a pain in the backside when your trying to combine it with "internalVar" or something.
I noticed this before in scripts but didnt bother trying myself so here goes:
//get user script directory.
string $SCRIPTDir=(`internalVar -usd`+"SCRIPT/") ;
//create string with source command and script path
string $sourceSCRIPT=("source "+"\"" +$SCRIPTDir +"scripts/SCRIPT.mel"+"\"") ;
//eval string
eval $sourceSCRIPT ;
//run sourced script
SCRIPT ;
quick edit, code can be cut down to just
ReplyDeleteeval("source \"" + `internalVar -usd` + "SCRIPT.mel\"");
simples.