Browse Source

Fixes for env problems

Josh Yelon 20 years ago
parent
commit
0f2e36eb84
1 changed files with 9 additions and 7 deletions
  1. 9 7
      pandatool/src/scripts/MayaPandaTool.mel

+ 9 - 7
pandatool/src/scripts/MayaPandaTool.mel

@@ -720,12 +720,12 @@ global proc string exportScene( string $selection )
 
 
 	if ( $selection == "all")
 	if ( $selection == "all")
 	{
 	{
-		file -op "v=1" -typ "mayaBinary" -pr -ea $tempScenePath;  //export the whole scene
+		file -op "v=1" -typ "mayaBinary" -ea $tempScenePath;  //export the whole scene
 		print ("Saved entire scene as temporary file: " + $fileName + "_temp.mb\n");
 		print ("Saved entire scene as temporary file: " + $fileName + "_temp.mb\n");
 	}
 	}
 	else
 	else
 	{
 	{
-		file -op "v=1" -typ "mayaBinary" -pr -es $tempScenePath;  //export only selected objects
+		file -op "v=1" -typ "mayaBinary" -es $tempScenePath;  //export only selected objects
 		print ("Saved selected objects as temporary file: " + $fileName + "_temp.mb\n");
 		print ("Saved selected objects as temporary file: " + $fileName + "_temp.mb\n");
 	}
 	}
 
 
@@ -864,6 +864,8 @@ global proc string argsBuilder()
 ///////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////
 global proc string export2Egg ( string $mbfile, string $destPath, string $destFilename, string $ARGS)
 global proc string export2Egg ( string $mbfile, string $destPath, string $destFilename, string $ARGS)
 {
 {
+        string $pandaEnvSetup = "set PATH=%MAYA_LOCATION%\\bin;%PATH% & ";
+
 	//Check if there is a valid maya binary file to operate on
 	//Check if there is a valid maya binary file to operate on
 	if ( $mbfile == "" )
 	if ( $mbfile == "" )
 	{
 	{
@@ -889,7 +891,7 @@ global proc string export2Egg ( string $mbfile, string $destPath, string $destFi
 			string $result =
 			string $result =
 				system
 				system
 				(
 				(
-					$ARGS
+                                        $pandaEnvSetup + $ARGS
 					+ " -o "
 					+ " -o "
 					+ "\"" + $eggFile + "\""
 					+ "\"" + $eggFile + "\""
 					+ " "
 					+ " "
@@ -904,7 +906,7 @@ global proc string export2Egg ( string $mbfile, string $destPath, string $destFi
 			string $result =
 			string $result =
 				system
 				system
 				(
 				(
-					$ARGS
+                                        $pandaEnvSetup + $ARGS
 					+ "\"" + $mbfile + "\""
 					+ "\"" + $mbfile + "\""
 					+ " "
 					+ " "
 					+ "\"" + $eggFile + "\""
 					+ "\"" + $eggFile + "\""
@@ -978,7 +980,7 @@ global proc send2Pview( string $file )
 	string $result =
 	string $result =
 				system
 				system
 				(
 				(
-					"shell pview -l -c "
+                                        "shell pview -l -c "
 					+ "\"" + $file + "\""
 					+ "\"" + $file + "\""
 				);
 				);
 
 
@@ -1154,7 +1156,7 @@ global proc export2Bam ( string $eggFile )
 			string $result =
 			string $result =
 				system
 				system
 				(
 				(
-					"egg2bam -o "
+                                        "egg2bam -o "
 					+ "\"" + $bamFile + "\""
 					+ "\"" + $bamFile + "\""
 					+ " "
 					+ " "
 					+ "\"" + $eggFile + "\""
 					+ "\"" + $eggFile + "\""
@@ -1168,7 +1170,7 @@ global proc export2Bam ( string $eggFile )
 			string $result =
 			string $result =
 				system
 				system
 				(
 				(
-					"egg2bam "
+                                        "egg2bam "
 					+ "\"" + $eggFile + "\""
 					+ "\"" + $eggFile + "\""
 					+ " "
 					+ " "
 					+ "\"" + $bamFile + "\""
 					+ "\"" + $bamFile + "\""