1/****************************************************************************** 2 NintendoWare for CTR Maya Plugin 3 4 File: NW4C_BatchExport.mel 5 Description: batch export 6 Date: 2010/02/04 7 8 Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc. All rights reserved. 9******************************************************************************/ 10 11/****************************************************************************** 12 main 13******************************************************************************/ 14global proc NW4C_BatchExport(string $c3beFile) 15{ 16 //----------------------------------------------------------------------------- 17 // source scripts 18 source NW4C_CommonProc; 19 source NW4C_ExpDialog; 20 21 //----------------------------------------------------------------------------- 22 // load plugin 23 if (!`pluginInfo -q -l "NW4C_Export.mll"`) 24 { 25 loadPlugin("NW4C_Export.mll"); 26 } 27 28 //----------------------------------------------------------------------------- 29 // expand environment varieble 30 if (substring($c3beFile, 1, 1) == "$") 31 { 32 string $env = substring($c3beFile, 2, size($c3beFile)); 33 $c3beFile = getenv($env); 34 // cut both end double quote 35 $c3beFile = substitute("^\"", $c3beFile, ""); 36 $c3beFile = substitute("\"$", $c3beFile, ""); 37 //trace ("env: " + $env + ", [" + $c3beFile + "]"); 38 } 39 40 //----------------------------------------------------------------------------- 41 // execute 42 string $cmd = "NW4C_BatchExportCmd -b \"" + $c3beFile + "\""; 43 eval($cmd); 44} 45