67 lines
6.2 KiB
HTML
67 lines
6.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Code Snippets</title>
|
|
<meta name="generator" content="Help & Manual" />
|
|
<meta name="keywords" content="code snippets,programming" />
|
|
<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", "codesnippets.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="converters.htm"><img border="0" src="../common/images/MGtoolsHelp_previous.gif" width="34" height="22" alt="Previous" /></a>
|
|
<a href="syncvaluewithmaya.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;">Code snippets are a block of codes to speed up the coding process.</span></p><p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 24px;"><span class="f_Heading1" style="font-size: 10pt; font-weight: normal;">In the code editor of the attribute editor, for example, the command of a command-button, or the menu editor with one menu item has been activated.</span></p>
|
|
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 24px;"><span class="f_Heading1" style="font-size: 10pt; font-weight: normal;">Press the down arrow button at the top right corner of the code editor, and the menu containing all the code snippets of the current language type ( Mel / Python ) will pop up,</span></p>
|
|
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 24px;"><span class="f_Heading1" style="font-size: 10pt; font-weight: normal;">select one of the code snippets, and the content of that snippet script file will be inserted into the cursor position of the code editor.</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;">How to create a code snippet?</span></p><p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 24px;"><span class="f_Heading1" style="font-size: 10pt; font-weight: normal;">Go to "Misc Menu / Create Presets/Code Snippets..", or in any code editing widget, click on the top-right triangle menu, and select "Export As Code Snippet..".</span></p>
|
|
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 24px;"><span class="f_Heading1" style="font-size: 10pt; font-weight: normal;">In the pop-up dialog, input the category, the code snippet name, and code and create.</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;">Where are those code snippet scripts?</span></p><p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 24px;"><span class="f_Heading1" style="font-size: 10pt; font-weight: normal;">For factory default code snippet scripts, they are in the Maya's user script folder/ MG-PickerStudio/MGPicker_Program/CodeSnippets,</span></p>
|
|
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 24px;"><span class="f_Heading1" style="font-size: 10pt; font-weight: normal;">the factory default code snippet scripts are maintained by the developer of MG-Picker Studio so better keep them intact.</span></p>
|
|
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 24px;"><span class="f_Heading1" style="font-size: 10pt; font-weight: normal;">For user command preset scripts, please put them here: Maya's user script folder/MG-PickerStudio/MGPicker_UserConfig/CodeSnippets.</span></p>
|
|
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 24px;"><span class="f_Heading1" style="font-size: 10pt; font-weight: normal;">Organize different types of snippets into two different folders: MEL/Python.</span></p>
|
|
<p class="p_Normal" style="line-height: 1.80; margin: 0 0 0 24px;"> </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="converters.htm"><img border="0" src="../common/images/MGtoolsHelp_previous.gif" width="34" height="22" alt="Previous" /></a>
|
|
<a href="syncvaluewithmaya.htm"><img border="0" src="../common/images/MGtoolsHelp_next.gif" width="34" height="22" alt="Next" /></a></td>
|
|
</tr>
|
|
</table>
|
|
|
|
</body>
|
|
</html>
|