Sunday, 27 March 2011

mel. using the "eval" command

just quick note:
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 ;