Update
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>转换器</title>
|
||||
<meta name="generator" content="Help & Manual" />
|
||||
<meta name="keywords" content="converters,picker converters" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<link type="text/css" href="default.css" rel="stylesheet" />
|
||||
<style type="text/css">
|
||||
body { margin: 0px; background: #F8F8F8; }
|
||||
</style>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="helpman_settings.js"></script>
|
||||
<script type="text/javascript" src="helpman_topicinit.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
HMSyncTOC("index.html", "converters.htm");
|
||||
</script>
|
||||
<script type="text/javascript" src="highlight.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){highlight();});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<table style="width:100%; border:none; border-spacing:0px; padding:0px; background:#D0D0D0">
|
||||
<tr style="vertical-align:middle">
|
||||
<td style="text-align:right">
|
||||
<a href="welcome.htm"><img border="0" src="../common/images/MGtoolsHelp_Home.gif" width="34" height="22" alt="Home" /></a>
|
||||
<a href="commandbuttonpresets.htm"><img border="0" src="../common/images/MGtoolsHelp_previous.gif" width="34" height="22" alt="Previous" /></a>
|
||||
<a href="codesnippets.htm"><img border="0" src="../common/images/MGtoolsHelp_next.gif" width="34" height="22" alt="Next" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<!-- Placeholder for topic body. -->
|
||||
<table style="width:100%;border:none;border-spacing:0px"><tr style="vertical-align:top"><td style="text-align:left;padding:5px">
|
||||
<p class="p_Normal" style="text-indent: 0; line-height: 1.80; padding-left: 13px; margin-left: 0;"><span class="f_Heading1" style="font-size:10pt; font-family: Arial,'Lucida Sans Unicode','Lucida Grande','Lucida Sans';display:inline-block;width:13px;margin-left:-13px">▪</span><span class="f_Heading1" style="font-size: 10pt;">转换器是用来将其它类型的picker节点、文件转换成mgpicker节点或文件的mel脚本。</span></p><p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 24px;"><span class="f_Heading1" style="font-size: 9pt; font-weight: normal;">转换器非常多地使用了由MG-Picker工作室提供的MEL API命令,主要是这三个命令:</span></p>
|
||||
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 22px;"><span class="f_Heading1" style="font-size: 10pt; font-weight: normal;"><a href="mgpicker.htm" class="topiclink">MGPicker</a>, <a href="mgpickeritem.htm" class="topiclink">MGPickerItem</a>, <a href="mgpickerlink.htm" class="topiclink">MGPickerLink</a>.</span></p>
|
||||
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 24px;"><span class="f_Heading1" style="font-size: 9pt; font-weight: normal;">请参考这些命令的文档来了解它们的用法。</span></p>
|
||||
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 24px;"> </p>
|
||||
<p class="p_Normal" style="text-indent: 0; line-height: 1.80; padding-left: 13px; margin-left: 0;"><span class="f_Heading1" style="font-size:10pt; font-family: Arial,'Lucida Sans Unicode','Lucida Grande','Lucida Sans';display:inline-block;width:13px;margin-left:-13px">▪</span><span class="f_Heading1" style="font-size: 10pt;">这些转换器MEL脚本放在哪里?</span></p><p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 24px;"><span class="f_Heading1" style="font-size: 9pt; font-weight: normal;">对于工具自带的转换器,是放在Maya的脚本文件夹/ MG-PickerStudio/MGPicker_Program/Converters里,</span></p>
|
||||
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 24px;"><span class="f_Heading1" style="font-size: 9pt; font-weight: normal;">这些转换器由MG-Picker工作室维护所以最好不要去动它。</span></p>
|
||||
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 24px;"><span class="f_Heading1" style="font-size: 9pt; font-weight: normal;">对于用户编写的转换器,请放在这里:Maya的脚本文件夹/MG-PickerStudio/MGPicker_UserConfig/Converters。</span></p>
|
||||
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 24px;"> </p>
|
||||
<p class="p_Normal" style="text-indent: 0; line-height: 1.80; padding-left: 13px; margin-left: 0;"><span class="f_Heading1" style="font-size:10pt; font-family: Arial,'Lucida Sans Unicode','Lucida Grande','Lucida Sans';display:inline-block;width:13px;margin-left:-13px">▪</span><span class="f_Heading1" style="font-size: 10pt;">要学习如何编写一个转换器,请参考自带的两个mel转换器作为例子参考:</span></p><p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 22px;"><span class="f_Heading1" style="font-size: 10pt; font-weight: normal;">Converter_abxPicker.mel, Converter_nickPicker.mel</span></p>
|
||||
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 48px;"> </p>
|
||||
<p class="p_Normal" style="text-indent: 0; line-height: 1.80; padding-left: 13px; margin-left: 0;"><span class="f_Heading1" style="font-size:10pt; font-family: Arial,'Lucida Sans Unicode','Lucida Grande','Lucida Sans';display:inline-block;width:13px;margin-left:-13px">▪</span><span class="f_Heading1" style="font-size: 10pt;">假设您的转换器是为了转换otherPicker类型的picker节点或文件,则转换器mel脚本就叫做Converter_otherPicker.mel, 然后这个mel脚本里必须用global proc编写下面的接口函数:</span></p><p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 22px;"><span class="f_Heading1" style="font-size: 10pt; font-weight: normal;">//other picker node converter API: </span></p>
|
||||
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 22px;"><span class="f_Heading1" style="font-size: 10pt; font-weight: normal;">global proc int Converter_otherPicke</span><span class="f_Heading1" style="font-size: 10pt; font-weight: normal;">r_autoReadNode(); //return 0~1 value, indicate if MG-Picker should invoke this converter to autoload your in-scene picker node.</span></p>
|
||||
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 22px;"><span class="f_Heading1" style="font-size: 10pt; font-weight: normal;">global proc string Converter_otherPicker_nodeType(); </span><span class="f_Heading1" style="font-size: 10pt; font-weight: normal;"> //return string value, the type string of picker node.</span></p>
|
||||
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 22px;">global proc int <span class="f_Heading1" style="font-size: 10pt; font-weight: normal;">Converter_otherPicker</span>_isPickerNode(string $node); //return 0~1 value, indicate the node is of the picker node.</p>
|
||||
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 22px;">global proc string <span class="f_Heading1" style="font-size: 10pt; font-weight: normal;">Converter_otherPicker</span>_getNamespace(string $node); //return the namespace from a picker node. </p>
|
||||
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 22px;"><span style="width:26px;display:inline-block"> </span> //The proc is used in find&Load feature of MG-Picker studio.</p>
|
||||
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 22px;">global proc string[] <span class="f_Heading1" style="font-size: 10pt; font-weight: normal;">Converter_otherPicker</span>_nodeLister(); //list all the picker nodes in the scene.</p>
|
||||
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 22px;">global proc int <span class="f_Heading1" style="font-size: 10pt; font-weight: normal;">Converter_otherPicker</span>_readNode(string $node); //the actual reader for each picker node.</p>
|
||||
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 22px;"> </p>
|
||||
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 22px;">//other picker file converter API: </p>
|
||||
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 22px;">global proc int <span class="f_Heading1" style="font-size: 10pt; font-weight: normal;">Converter_otherPicker</span>_isPickerFile(string $fileFullPath); //Return 1 if the file is the picker file, 0 if not. </p>
|
||||
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 22px;">global proc int <span class="f_Heading1" style="font-size: 10pt; font-weight: normal;">Converter_otherPicker</span>_readFile(string $fileFullPath); //the actual reader for each picker file.</p>
|
||||
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 48px;"><span style="width:48px;display:inline-block"> </span> </p>
|
||||
|
||||
</td></tr></table>
|
||||
<table height="30" width="100%" border="0" cellspacing="" cellpadding="0" bgcolor="#D0D0D0">
|
||||
<tr valign="bottom" bgcolor="#D0D0D0" >
|
||||
<td align="left" valign="middle" >
|
||||
<a href="welcome.htm"><img border="0" src="../common/images/MGtoolsHelp_Home.gif" width="34" height="22" alt="Home" /></a>
|
||||
<a href="commandbuttonpresets.htm"><img border="0" src="../common/images/MGtoolsHelp_previous.gif" width="34" height="22" alt="Previous" /></a>
|
||||
<a href="codesnippets.htm"><img border="0" src="../common/images/MGtoolsHelp_next.gif" width="34" height="22" alt="Next" /></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user