亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? maya2ogre_export.mel

?? 使用stl技術,(還沒看,是聽說的)
?? MEL
字號:
/*
============================================================================
This source file is part of the Ogre-Maya Tools.
Distributed as part of Ogre (Object-oriented Graphics Rendering Engine).
Copyright (C) 2003 Fifty1 Software Inc.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
or go to http://www.gnu.org/licenses/gpl.txt
============================================================================
*/

namespace -add "maya2ogre";
namespace -set "maya2ogre";


// ===== Export
global proc ExportToOgre()
{
	saveFileInfo;
	
	// ===== Files and directories
	string $sceneFile    = `file -query -sceneName`;
	string $mayaFile     = basename($sceneFile, "");
	string $sceneDir     = toNativePath(dirname($sceneFile));
	string $baseFile     = basename($sceneFile, ".mb");
	string $outputDir    = toNativePath(`textField -query -text OutputDirectory`);
	string $meshFile     = toNativePath(`textField -query -text ExportMeshFilename`);
	string $materialFile = toNativePath(`textField -query -text ExportMaterialFilename`);
	string $skeletonFile = toNativePath(`textField -query -text ExportSkeletonFilename`);
	

	// ===== Make working copy of Maya file
	// (Removes need to save before exporting)
	string $mayaWorkingFile = `internalVar -userScriptDir` + "maya2ogre.mb";
	file -rename $mayaWorkingFile;
	file -save -force;
	file -rename $mayaFile;

	
	// ===== Options
	string $options = "";
	
	// --- Common params
	$options += " -in \"" + $mayaWorkingFile + "\"";
	string $materialPrefix = `textField -query -text MaterialPrefix`;
	if ($materialPrefix != "") 
	{
		$options += " -mprefix " + $materialPrefix;
	}
	
	// --- Mesh export
	int $exportMesh = `checkBox -query -value ExportMesh`;
	int $convertMesh = `checkBox -query -value ExportMeshBinary`;
	if ($exportMesh)
	{
		$options += " -mesh \"" + $outputDir + $meshFile + "\"";

		if (`checkBox -query -value ExportMeshVBA`)
		{
			$options += " -vba";
		}
		if (`checkBox -query -value ExportMeshNormals`)
		{
			$options += " -n";
		}
		if (`checkBox -query -value ExportMeshColours`)
		{
			$options += " -c";
		}
		if (`checkBox -query -value ExportMeshUVs`)
		{
			$options += " -t";
		}
	}
	
	// --- Material export
	int $exportMaterial = `checkBox -query -value ExportMaterial`;
	if ($exportMaterial)
	{
		$options += " -mat \"" + $outputDir + $materialFile + "\"";
	}

	// --- Skeleton/Animation export
	int $exportSkeleton = `checkBox -query -value ExportSkeleton`;
	int $convertSkeleton = `checkBox -query -value ExportSkeletonBinary`;
	if ($exportSkeleton)
	{
		$options += " -skel \"" + $outputDir + $skeletonFile + "\"";
		
		if (`checkBox -query -value ExportAnim`)
		{
			int $iAnim;
			string $animNameField;
			string $animStartField;
			string $animEndField;
			string $animStepField;

			for ($iAnim=1; $iAnim<=8; $iAnim++)
			{
				$animNameField  = "AnimName0"  + $iAnim;
				$animStartField = "AnimStart0" + $iAnim;
				$animEndField   = "AnimEnd0"   + $iAnim;
				$animStepField  = "AnimStep0"  + $iAnim;
				
				if (`textField -query -text $animNameField` != "")
				{
					$options += " -anim " + `textField -query -text $animNameField`;
					$options += " " + `intField -query -value $animStartField`;
					$options += " " + `intField -query -value $animEndField`;
					$options += " " + `intField -query -value $animStepField`;
				}
			}
		}
	}
	
	
	
	// ===== Export
	
	// --- Windows
	if (`about -windows`) 
	{
		string $commands;
		$commands += "rem ==================" + "\n";
		$commands += "rem Export to Ogre XML" + "\n";
		$commands += "rem ==================" + "\n";
		
		$commands += "set path=" + toNativePath(`internalVar -userScriptDir`) + ";%path%" + "\n";
		$commands += "pushd " + $sceneDir + "\n";
		$commands += "maya2ogre.exe " + $options + "\n";
		if ($exportMesh && $convertMesh) 
		{
			$commands += "rem ======================" + "\n";
			$commands += "rem Convert Mesh to Binary" + "\n";
			$commands += "rem ======================" + "\n";
			$commands += "pushd " + $outputDir + "\n";
			$commands += "OgreXMLConverter " + $meshFile + "\n";
			$commands += "popd" + "\n";
		}
		if ($exportSkeleton && $convertSkeleton) 
		{
			$commands += "rem ==========================" + "\n";
			$commands += "rem Convert Skeleton to Binary" + "\n";
			$commands += "rem ==========================" + "\n";
			$commands += "pushd " + $outputDir + "\n";
			$commands += "OgreXMLConverter " + $skeletonFile + "\n";
			$commands += "popd" + "\n";
		}
		$commands += "popd" + "\n";
		$commands += "pause" + "\n";
		
		string $commandFile = `internalVar -userScriptDir` + "maya2ogre_mel.bat";
		$fileID = `fopen $commandFile "w"`;
		fprint $fileID $commands;
		fclose $fileID;

		system("start \"" + `toNativePath $commandFile` + "\"");
	}
	
	// --- Linux
	else if (`about -linux`)
	{
		confirmDialog 
		   -title "Ogre Exporter"
		   -message "Sorry, but there is no command-line exporter or plug-in available for Linux yet. "
		   -button "Ok";
	}

	// --- Mac
	else if (`about -mac`)
	{
		confirmDialog 
		   -title "Ogre Exporter"
		   -message "Sorry, but there is no command-line exporter or plug-in available for Mac yet. ";
	}
	
}


// ===== Load preferences from fileInfo
// fileInfo is stored with Maya files so that export preferences
// are preserved with each source file.
global proc loadFileInfo()
{
	// Common parameters
	textField -edit -fileName `fileInfo -query "maya2ogre_outputDir"` OutputDirectory;
	textField -edit -text `fileInfo -query "maya2ogre_matPrefix"` MaterialPrefix;

	// Mesh
	string $valStrings[] = `fileInfo -query "maya2ogre_exportMesh"`;
	checkBox -edit -value `gmatch $valStrings[0] "1"` ExportMesh;

	string $valStrings[] = `fileInfo -query "maya2ogre_convertMesh"`;
	checkBox -edit -value `gmatch $valStrings[0] "1"` ExportMeshBinary;
	
	string $valStrings[] = `fileInfo -query "maya2ogre_exportMeshNormals"`;
	checkBox -edit -value `gmatch $valStrings[0] "1"` ExportMeshNormals;

	string $valStrings[] = `fileInfo -query "maya2ogre_exportMeshColours"`;
	checkBox -edit -value `gmatch $valStrings[0] "1"` ExportMeshColours;

	string $valStrings[] = `fileInfo -query "maya2ogre_exportMeshVBA"`;
	checkBox -edit -value `gmatch $valStrings[0] "1"` ExportMeshVBA;

	string $valStrings[] = `fileInfo -query "maya2ogre_exportMeshUVs"`;
	checkBox -edit -value `gmatch $valStrings[0] "1"` ExportMeshUVs;

	string $valStrings[] = `fileInfo -query "maya2ogre_exportMeshFile"`;
	if ($valStrings[0] != "") 
	{
		textField -edit -text `fileInfo -query "maya2ogre_exportMeshFile"` ExportMeshFilename;
	}
	
	// Material
	string $valStrings[] = `fileInfo -query "maya2ogre_exportMat"`;
	checkBox -edit -value `gmatch $valStrings[0] "1"` ExportMaterial;

	string $valStrings[] = `fileInfo -query "maya2ogre_exportMatFile"`;
	if ($valStrings[0] != "") 
	{
		textField -edit -text `fileInfo -query "maya2ogre_exportMatFile"` ExportMaterialFilename;
	}

	// Skeleton	
	string $valStrings[] = `fileInfo -query "maya2ogre_exportSkel"`;
	checkBox -edit -value `gmatch $valStrings[0] "1"` ExportSkeleton;

	string $valStrings[] = `fileInfo -query "maya2ogre_convertSkel"`;
	checkBox -edit -value `gmatch $valStrings[0] "1"` ExportSkeletonBinary;

	string $valStrings[] = `fileInfo -query "maya2ogre_exportSkelFile"`;
	if ($valStrings[0] != "") 
	{
		textField -edit -text `fileInfo -query "maya2ogre_exportSkelFile"` ExportSkeletonFilename;
	}
	
	// Animation
	string $valStrings[] = `fileInfo -query "maya2ogre_exportAnim"`;
	checkBox -edit -value `gmatch $valStrings[0] "1"` ExportAnim;

	int $iAnim;
	string $animNameField;
	string $animFileInfoKey;
	string $animFileInfoValue[];
	string $animStartField;
	string $animEndField;
	string $animStepField;
	for ($iAnim=1; $iAnim<=8; $iAnim++)
	{
		$animFileInfoKey = "maya2ogre_anim0" + $iAnim;
		$animNameField   = "AnimName0"  + $iAnim;
		$animStartField  = "AnimStart0" + $iAnim;
		$animEndField    = "AnimEnd0"   + $iAnim;
		$animStepField   = "AnimStep0"  + $iAnim;
		
		$animFileInfoValue = `fileInfo -query $animFileInfoKey`;
		string $animFileInfoDetails[];
		tokenize $animFileInfoValue[0] "," $animFileInfoDetails;
		
		string $animName = $animFileInfoDetails[0];
		if ($animName == "!") $animName = "";
		textField -edit -text $animName $animNameField;
		int $start = (int)$animFileInfoDetails[1];
		int $end   = (int)$animFileInfoDetails[2];
		int $step  = (int)$animFileInfoDetails[3];
		intField -edit -value $start $animStartField;
		intField -edit -value $end $animEndField;
		intField -edit -value $step $animStepField;
	}
}


// ===== Save preferences to fileInfo
global proc saveFileInfo()
{
	// Common parameters
	fileInfo "maya2ogre_outputDir" `textField -query -fileName OutputDirectory`;
	fileInfo "maya2ogre_matPrefix" `textField -query -text MaterialPrefix`;

	// Mesh
	fileInfo "maya2ogre_exportMesh" `checkBox -query -value ExportMesh`;
	fileInfo "maya2ogre_convertMesh" `checkBox -query -value ExportMeshBinary`; 
	fileInfo "maya2ogre_exportMeshNormals" `checkBox -query -value ExportMeshNormals`;
	fileInfo "maya2ogre_exportMeshColours" `checkBox -query -value ExportMeshColours`;
	fileInfo "maya2ogre_exportMeshVBA" `checkBox -query -value ExportMeshVBA`;
	fileInfo "maya2ogre_exportMeshUVs" `checkBox -query -value ExportMeshUVs`;
	fileInfo "maya2ogre_exportMeshFile" `textField -query -text ExportMeshFilename`;
	
	// Material
	fileInfo "maya2ogre_exportMat" `checkBox -query -value ExportMaterial`;
	fileInfo "maya2ogre_exportMatFile" `textField -query -text ExportMaterialFilename`;
	
	// Skeleton	
	fileInfo "maya2ogre_exportSkel" `checkBox -query -value ExportSkeleton`;
	fileInfo "maya2ogre_convertSkel" `checkBox -query -value ExportSkeletonBinary`; 
	fileInfo "maya2ogre_exportSkelFile" `textField -query -text ExportSkeletonFilename`;
	
	// Animation
	fileInfo "maya2ogre_exportAnim" `checkBox -query -value ExportAnim`;
	int $iAnim;
	string $animNameField;
	string $animFileInfoKey;
	string $animFileInfoValue;
	string $animStartField;
	string $animEndField;
	string $animStepField;
	for ($iAnim=1; $iAnim<=8; $iAnim++)
	{
		$animFileInfoKey = "maya2ogre_anim0" + $iAnim;
		$animNameField   = "AnimName0"  + $iAnim;
		$animStartField  = "AnimStart0" + $iAnim;
		$animEndField    = "AnimEnd0"   + $iAnim;
		$animStepField   = "AnimStep0"  + $iAnim;
		
		string $animName = `textField -query -text $animNameField`;
		if ($animName == "") $animName = "!";
		$animFileInfoValue = $animName;
		$animFileInfoValue += ", " + `intField -query -value $animStartField`;
		$animFileInfoValue += ", " + `intField -query -value $animEndField`;
		$animFileInfoValue += ", " + `intField -query -value $animStepField`;
		
		fileInfo $animFileInfoKey $animFileInfoValue;
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本va欧美va欧美va精品| 亚洲四区在线观看| 亚洲三级在线观看| 精品一区二区日韩| 国产在线精品一区二区夜色| 久久先锋影音av鲁色资源网| 中文字幕在线不卡国产视频| 欧美aaaaaa午夜精品| 成人性生交大片免费看中文| 欧美亚洲一区二区在线观看| 国产日产欧美精品一区二区三区| 亚洲影视资源网| 黄色小说综合网站| 日韩视频一区二区三区| 亚洲人快播电影网| 国产一区二三区| 欧美日韩国产bt| 国产亚洲va综合人人澡精品| 午夜婷婷国产麻豆精品| 国产成人欧美日韩在线电影| 欧美蜜桃一区二区三区| 国产欧美一区二区精品久导航| 亚洲精品菠萝久久久久久久| 精品亚洲porn| 欧美图片一区二区三区| 2017欧美狠狠色| 久久99在线观看| 欧美日韩在线三级| 久久久av毛片精品| 成人在线综合网| 亚洲精品一区二区三区香蕉| 亚洲影院免费观看| 欧美少妇一区二区| 亚洲免费av高清| 成人综合激情网| 亚洲欧洲韩国日本视频| 国产成人免费视频网站高清观看视频| 欧美三级欧美一级| 免费日韩伦理电影| 欧美一区二区三区免费在线看| 一区二区三区国产精华| 欧美视频一区在线| 一区二区三区国产精华| 色婷婷久久久久swag精品| 国产精品女同互慰在线看| 日韩精品综合一本久道在线视频| 国产视频一区二区在线观看| 欧美三级乱人伦电影| 色偷偷一区二区三区| 色综合色狠狠综合色| 99综合影院在线| 国产精品一区二区三区四区| 秋霞电影一区二区| 日本大胆欧美人术艺术动态 | 国产日韩一级二级三级| 亚洲成人动漫在线观看| 成人h精品动漫一区二区三区| 中日韩免费视频中文字幕| 国产精品羞羞答答xxdd| 久久久精品中文字幕麻豆发布| 韩国av一区二区三区四区| 337p日本欧洲亚洲大胆精品| 国产乱码一区二区三区| 日韩午夜激情视频| 国产一区二区三区精品欧美日韩一区二区三区| 日韩欧美一区在线观看| 日本亚洲电影天堂| 欧美激情一区二区三区全黄| 97久久精品人人做人人爽| 国产精品久99| 日韩一区二区三区视频| 国产麻豆一精品一av一免费| 国产午夜一区二区三区| 在线观看日韩电影| 美女一区二区久久| 国产午夜精品在线观看| 欧美顶级少妇做爰| 狠狠色狠狠色合久久伊人| 中文字幕免费不卡| 日韩欧美亚洲国产另类| aaa欧美日韩| 玉足女爽爽91| 国产日韩欧美激情| 欧美系列日韩一区| 亚洲最色的网站| 国产精品久久久久久久久晋中| 日本久久电影网| 美女视频一区二区三区| 亚洲在线中文字幕| 国产亚洲精品资源在线26u| av亚洲精华国产精华精| 国产在线看一区| 亚洲国产精品麻豆| 久久综合狠狠综合久久综合88| 色综合咪咪久久| 亚洲三级在线免费| 欧美在线高清视频| 欧美色国产精品| 成人永久免费视频| 欧美性xxxxxxxx| 亚洲精品午夜久久久| 成人免费视频视频| 欧美一区二区在线看| 日本少妇一区二区| 精品国产一区二区三区久久影院| 亚洲欧洲另类国产综合| 欧美日韩国产综合视频在线观看| 欧美久久久久久久久久| 亚洲图片自拍偷拍| 欧美极品aⅴ影院| 91精品国产欧美一区二区成人| 欧美色爱综合网| 97精品国产露脸对白| 国产精品自拍网站| 国产精品夜夜嗨| 亚洲成a人片综合在线| 亚洲人成7777| 亚洲欧洲综合另类在线| 欧美国产禁国产网站cc| 久久久久青草大香线综合精品| 亚洲精品在线观看网站| 欧美高清一级片在线| 在线一区二区三区四区| 色欧美88888久久久久久影院| 国产91丝袜在线播放九色| 久久精品国产亚洲高清剧情介绍 | 久久精品亚洲一区二区三区浴池| 欧美日韩精品一区二区天天拍小说| 欧美色综合久久| 欧美性xxxxxx少妇| 色婷婷国产精品| 欧美一级日韩不卡播放免费| 欧美精三区欧美精三区| 色综合久久88色综合天天6 | 国产精品私房写真福利视频| 久久久精品免费观看| 国产日韩欧美激情| 中文字幕国产一区| 中文字幕人成不卡一区| 国产欧美一区二区三区网站 | 91一区二区在线| 99re热视频这里只精品| 91免费版在线看| 欧美调教femdomvk| 91精品久久久久久久久99蜜臂| 欧美一级夜夜爽| 一本色道综合亚洲| 欧美亚洲国产一区二区三区| 欧美日韩精品一区二区三区| 日韩电影在线一区| 韩国精品主播一区二区在线观看| 天天综合天天综合色| 日本中文字幕一区二区视频 | 99久久精品免费看国产| 国产精品小仙女| 91福利国产成人精品照片| 亚洲视频每日更新| 日韩欧美在线影院| 国产亚洲人成网站| 亚洲成人免费视| 另类小说综合欧美亚洲| av一区二区三区黑人| 欧美一区午夜视频在线观看| 久久久美女艺术照精彩视频福利播放| 这里只有精品视频在线观看| 国产亚洲视频系列| 免费久久精品视频| 在线影视一区二区三区| 久久久久久亚洲综合影院红桃| 亚洲国产人成综合网站| 国产99精品国产| 欧美大片日本大片免费观看| 一区二区视频免费在线观看| 国产乱码字幕精品高清av| 337p亚洲精品色噜噜狠狠| 亚洲婷婷综合色高清在线| 久久精品国产久精国产爱| 欧美日本视频在线| 亚洲一线二线三线久久久| 国产激情91久久精品导航| 日韩精品中文字幕在线一区| 亚洲狠狠爱一区二区三区| 一本色道久久加勒比精品| 国产精品国产馆在线真实露脸| 激情欧美日韩一区二区| 91麻豆精品久久久久蜜臀| 亚洲综合色噜噜狠狠| 99久久综合99久久综合网站| 欧美韩国日本不卡| 国产传媒一区在线| 久久久亚洲精华液精华液精华液| 日本女优在线视频一区二区| 欧美日韩成人在线| 午夜影视日本亚洲欧洲精品| 91猫先生在线| 一区二区三区不卡在线观看| 欧美伊人久久久久久午夜久久久久| 国产精品久久午夜夜伦鲁鲁| 成人自拍视频在线| 中文字幕亚洲成人|