This commit is contained in:
2025-11-23 23:31:18 +08:00
parent d60cdc52fd
commit 9f7667a475
710 changed files with 252869 additions and 6 deletions

View File

@@ -0,0 +1,283 @@
<!DOCTYPE html>
<html>
<head>
<title>MGPickerLink Command</title>
<meta name="generator" content="Help &amp; Manual" />
<meta name="keywords" content="API,MGPickerLink command" />
<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", "mgpickerlink.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>&nbsp;
<a href="mgpickeritem.htm"><img border="0" src="../common/images/MGtoolsHelp_previous.gif" width="34" height="22" alt="Previous" /></a>
<a href="mgpickermenu.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">
<div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
<tr>
<td style="vertical-align:middle; height:8px; padding:1px; border:none"><p><span style="font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;">command</span><span style="font-family: 'Times New Roman',Times,Georgia,serif;"> (MEL/Python)</span></p>
</td>
</tr>
<tr>
<td style="vertical-align:middle; height:5px; padding:1px; border:none"><h1 class="p_Heading1" style="margin: 19px 0 19px 0;"><span class="f_Heading1" style="font-size: 24pt; font-family: 'Times New Roman',Times,Georgia,serif;">MGPickerLink</span></h1>
</td>
</tr>
</table>
</div>
<p class="p_Normal" style="margin: 14px 0 0 0;"><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">Go to: <a href="mgpickerlink.htm#synopsis" class="topiclink">Synopsis</a>. <a href="mgpickerlink.htm#examples" class="topiclink">MEL examples</a>. <a href="mgpickerlink.htm#pyexamples" class="topiclink">Python examples</a>.</span></p>
<p class="p_Normal" style="margin: 19px 0 0 0;"><a id="synopsis" class="hmanchor"></a><span style="font-size: 14pt; font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;"> Synopsis</span></p>
<p class="p_Normal" style="margin: 19px 0 0 0;"><span style="font-family: 'Courier New',Courier,monospace;">MGPickerLink (linkIDString, [<a href="mgpickerlink.htm#exist" class="topiclink">exist</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">boolean</span><span style="font-family: 'Courier New',Courier,monospace;">] [<a href="mgpickerlink.htm#remove" class="topiclink">remove</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">boolean</span><span style="font-family: 'Courier New',Courier,monospace;">] [<a href="mgpickerlink.htm#source" class="topiclink">source</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string</span><span style="font-family: 'Courier New',Courier,monospace;">] [<a href="mgpickerlink.htm#target" class="topiclink">target</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string</span><span style="font-family: 'Courier New',Courier,monospace;">] [<a href="https://www.helpandmanual.com/order.html" class="topiclink">targetValues</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string</span><span style="font-family: 'Courier New',Courier,monospace;">] [<a href="mgpickerlink.htm#type" class="topiclink">type</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">boolean</span><span style="font-family: 'Courier New',Courier,monospace;">]) [<a href="mgpickerlink.htm#view" class="topiclink">view</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string</span><span style="font-family: 'Courier New',Courier,monospace;">])</span></p>
<p class="p_Normal" style="margin: 0 0 14px 0;"><span style="font-family: 'Times New Roman',Times,Georgia,serif; font-style: italic;">Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.</span></p>
<p class="p_Normal" style="margin: 14px 0 14px 0;"><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">MGPickerLink is </span><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;">NOT undoable</span><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">, </span><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">queryable, and editable.</span></p>
<p><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">This command create / queries / edit picker links.</span></p>
<p class="p_Normal">&nbsp;</p>
<p class="p_Normal">&nbsp;</p>
<div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
<tr>
<td style="vertical-align:bottom; background-color:#CCCCCC; padding:1px; border:none"><p><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;">Long name (short name)</span></p>
</td>
<td style="vertical-align:bottom; background-color:#CCCCCC; padding:1px; border:none"><p><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif; font-style: italic; font-weight: bold;">Argument types</span></p>
</td>
<td style="vertical-align:bottom; background-color:#CCCCCC; padding:1px; border:none"><p><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;">Properties</span></p>
</td>
</tr>
<tr>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="exist" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-exist</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-ex</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
</td>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><br />
</td>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="query" title="query" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="query.gif"/></p>
</td>
</tr>
<tr>
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
<tr>
<td style="vertical-align:top; width:40px; padding:1px; border:none"><br />
</td>
<td style="vertical-align:middle; width:943px; padding:1px; border:none"><p class="p_Normal"><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">This is a query only flag that can be used to query for the existence of a specific link.</span></p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="remove" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-remove</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-rm</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
</td>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><br />
</td>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="edit" title="edit" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="edit.gif"/></p>
</td>
</tr>
<tr>
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
<tr>
<td style="vertical-align:top; width:40px; padding:1px; border:none"><br />
</td>
<td style="vertical-align:middle; width:943px; padding:1px; border:none"><p><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">This is a edit only flag that can be used to remove a specific link.</span></p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="source" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-source</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-s</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
</td>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string</span></p>
</td>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="create" title="create" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="create.gif"/><img alt="query" title="query" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="query.gif"/></p>
</td>
</tr>
<tr>
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
<tr>
<td style="vertical-align:top; width:40px; padding:1px; border:none"><br />
</td>
<td style="vertical-align:middle; width:942px; padding:1px; border:none"><p><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">If queried this flag will return the source picker item id.</span></p>
<p><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">The flag can't be used in edit mode, and you must use it with -target flag to both assign a source &amp; target picker item id.</span></p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="target" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-target</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-t</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
</td>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
<tr>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string</span></p>
</td>
</tr>
</table>
</div>
</td>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="create" title="create" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="create.gif"/><img alt="query" title="query" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="query.gif"/></p>
</td>
</tr>
<tr>
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
<tr>
<td style="vertical-align:top; width:40px; padding:1px; border:none"><br />
</td>
<td style="vertical-align:middle; width:943px; padding:1px; border:none"><p><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">If queried this flag will return the target picker item id.</span></p>
<p><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">The flag can't be used in edit mode, and you must use it with -source flag to both assign a source &amp; target picker item id.</span></p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="targetvalues" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-targetValues</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-tvs</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
</td>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string</span></p>
</td>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="create" title="create" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="create.gif"/><img alt="query" title="query" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="query.gif"/><img alt="edit" title="edit" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="edit.gif"/></p>
</td>
</tr>
<tr>
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
<tr>
<td style="vertical-align:top; width:40px; padding:1px; border:none"><br />
</td>
<td style="vertical-align:middle; width:943px; padding:1px; border:none"><p><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">If queried this flag will return all the target values as string array.</span></p>
<p><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">In creation / edit mode, you must assign a string value as the argument, the string is all the target value strings join by &quot;,&quot; character.</span></p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="type" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-type</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-typ</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
</td>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><span style="color: #000000;">&nbsp;</span></p>
</td>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="query" title="query" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="query.gif"/></p>
</td>
</tr>
<tr>
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
<tr>
<td style="vertical-align:top; width:40px; padding:1px; border:none"><br />
</td>
<td style="vertical-align:middle; width:943px; padding:1px; border:none"><p class="p_Normal"><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">This is a query only flag that can be used to query for the type of a specific link.</span></p>
<p class="p_Normal"><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">You can't edit the type of the link using this flag, since the type is auto-decided by the source &amp; target picker items.</span></p>
<p class="p_Normal"><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">The possible type string are &nbsp;&quot;parentLink&quot; or &quot;attributeLink&quot;.</span></p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><a id="view" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-view</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-v</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
</td>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string</span></p>
</td>
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="create" title="create" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="create.gif"/><img alt="query" title="query" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="query.gif"/><img alt="edit" title="edit" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="edit.gif"/></p>
</td>
</tr>
<tr>
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
<tr>
<td style="vertical-align:top; width:40px; padding:1px; border:none"><br />
</td>
<td style="vertical-align:middle; width:943px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">This controls which picker view that the link belongs to, if this flag is not specified, then current view will be used by default. A picker view id string should be specified for this flag in query, create, edit mode. </span></p>
<p style="line-height: 1.38;"><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">The picker view id could be retrieved by MGPicker commands such as: &nbsp;(Please refer to MGPicker command manual for further details.)</span></p>
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;"> &nbsp; &nbsp;MGPicker -q -currentPickerView; &nbsp; &nbsp; // Get current script execution view id, eg. picker load command, picker mouse enter command. Only be set during the script being executed.</span><br />
<span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;"> &nbsp; &nbsp;MGPicker -q -activePickerView; &nbsp; &nbsp; // Get current active view id.</span></p>
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;"> &nbsp; &nbsp;MGPicker -q -findPickerView &nbsp;&quot;pickerNodeOrFileName&quot; &nbsp;1 &quot;namespace&quot;; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Find picker view id via picker node name or picker file name and namespace.</span></p>
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;"> &nbsp; &nbsp;MGPicker -q -listAllPickerViews; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// List ids of all opened picker views.</span></p>
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;"> &nbsp; &nbsp;MGPicker -e -createTempPicker; &nbsp; &nbsp; // Create a temporary picker view and return its id.</span></p>
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;"> &nbsp; &nbsp;MGPicker -e -createPicker &quot;pickerName&quot; &quot;namespace&quot; &quot;filePath&quot; &quot;nodeName&quot;; &nbsp; &nbsp; &nbsp; &nbsp;// Create a picker view and return its id. </span></p>
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;"> &nbsp; &nbsp;MGPicker -e -readPickerNode &quot;nodeName&quot;; &nbsp; &nbsp; &nbsp; // Read in-scene picker node and return its id.</span></p>
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;"> &nbsp; &nbsp;MGPicker -e -readScenePicker &quot;nodeName&quot; &quot;pickerName&quot; &quot;namespace&quot; &quot;pickerDataString&quot;; &nbsp; &nbsp; &nbsp; // Read in-scene picker node and return its id.</span></p>
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;"> &nbsp; &nbsp;MGPicker -e -readPickerFile &quot;pickerFilePath&quot; 1; &nbsp; &nbsp; &nbsp; &nbsp; // Read a picker file and return its id.</span></p>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<hr style="height:2px; color:#CCCCCC; border-width:0; background-color:#cccccc;" /><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 10px 0 0 0;"><table style="background-color:#eeeeee; border:none; border-spacing:1px;">
<tr>
<td style="vertical-align:top; padding:4px; border:none"><p><img alt="create" width="13" height="16" style="margin:0;width:13px;height:16px;border:none" src="create.gif"/><span class="f_ImageCaption"> </span><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">Flag can appear in Create mode of command</span></p>
</td>
<td style="vertical-align:top; padding:4px; border:none"><p><img alt="edit" width="13" height="16" style="margin:0;width:13px;height:16px;border:none" src="edit.gif"/><span class="f_ImageCaption"> </span><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">Flag can appear in Edit mode of command</span></p>
</td>
</tr>
<tr>
<td style="vertical-align:top; padding:4px; border:none"><p><img alt="query" width="13" height="16" style="margin:0;width:13px;height:16px;border:none" src="query.gif"/><span class="f_ImageCaption"> </span><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">Flag can appear in Query mode of command</span></p>
</td>
<td style="vertical-align:top; padding:4px; border:none"><p><img alt="multiuse" width="13" height="16" style="margin:0;width:13px;height:16px;border:none" src="multiuse.gif"/><span class="f_ImageCaption"> </span><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">Flag can be used more than once in a command.</span></p>
</td>
</tr>
</table>
</div>
<p style="margin: 19px 0 0 0;"><a id="examples" class="hmanchor"></a><span style="font-size: 14pt; font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;">MEL examples</span></p>
<p class="p_Normal" style="line-height: 1.0; white-space: nowrap; margin: 19px 0 0 0;"><span style="font-family: 'Courier New',Courier,monospace;">//You&nbsp;must&nbsp;make&nbsp;sure&nbsp;the&nbsp;picker&nbsp;item:&nbsp;selectButton1,&nbsp;selectButton2,&nbsp;attributeButton1&nbsp;are&nbsp;already&nbsp;in&nbsp;scene&nbsp;in&nbsp;order&nbsp;to&nbsp;test&nbsp;these&nbsp;codes.</span><br />
<span style="font-family: 'Courier New',Courier,monospace;">//link&nbsp;two&nbsp;select-buttons&nbsp;with&nbsp;parent&nbsp;link.</span><br />
<span style="font-family: 'Courier New',Courier,monospace;">//for&nbsp;select-button,&nbsp;the&nbsp;target&nbsp;attribute&nbsp;value&nbsp;flag&nbsp;makes&nbsp;no&nbsp;sense.</span><br />
<span style="font-family: 'Courier New',Courier,monospace;">//you&nbsp;don't&nbsp;want&nbsp;to&nbsp;assign&nbsp;a&nbsp;custom&nbsp;link&nbsp;name&nbsp;here,&nbsp;since&nbsp;it&nbsp;is&nbsp;always&nbsp;sourcePickerItemName&gt;targetPickerItemName. &nbsp; &nbsp; &nbsp; &nbsp;</span><br />
<span style="font-family: 'Courier New',Courier,monospace;">string&nbsp;$newParentLink&nbsp;=&nbsp;`MGPickerLink&nbsp;-s&nbsp;selectButton1&nbsp;-t&nbsp;selectButton2`;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><br />
<span style="font-family: 'Courier New',Courier,monospace;">print&nbsp;(&quot;The&nbsp;type&nbsp;for&nbsp;the&nbsp;link&nbsp;\&quot;&quot;+$newParentLink+&quot;\&quot;&nbsp;is:&nbsp;&quot;+`MGPickerLink&nbsp;-q&nbsp;-type&nbsp;$newParentLink`&nbsp;+&nbsp;&quot;.\n&quot;);</span></p>
<p class="p_Normal" style="line-height: 1.0; white-space: nowrap; margin: 19px 0 0 0;"><span style="font-family: 'Courier New',Courier,monospace;">//link&nbsp;seelct-button&nbsp;to&nbsp;a&nbsp;attribute&nbsp;button,&nbsp;a&nbsp;attribute-link&nbsp;will&nbsp;be&nbsp;created.</span><br />
<span style="font-family: 'Courier New',Courier,monospace;">string&nbsp;$newAttrLink&nbsp;=&nbsp;`MGPickerLink&nbsp;-s&nbsp;&quot;selectButton1&quot;&nbsp;-t&nbsp;&quot;attributeButton1&quot;&nbsp;-targetValues&nbsp;&quot;Green,Red&quot;`;</span><br />
<span style="font-family: 'Courier New',Courier,monospace;">print&nbsp;&quot;The&nbsp;item&nbsp;selectButton1&nbsp;is&nbsp;linked&nbsp;and&nbsp;controlled&nbsp;by&nbsp;the&nbsp;item&nbsp;attributeButton1&nbsp;at&nbsp;values:&nbsp;\n&quot;;</span><br />
<span style="font-family: 'Courier New',Courier,monospace;">print&nbsp;`MGPickerLink&nbsp;-q&nbsp;-targetValues&nbsp;$newAttrLink`;</span></p>
<p style="margin: 19px 0 0 0;"><a id="pyexamples" class="hmanchor"></a><span style="font-size: 14pt; font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;">Python examples</span></p>
<p style="margin: 19px 0 0 0;"><span style="font-family: 'Courier New',Courier,monospace;">from mgpicker import mgp</span></p>
<p style="margin: 19px 0 0 0;"><span style="font-family: 'Courier New',Courier,monospace;">#You must make sure the picker item: selectButton1, selectButton2, attributeButton1 are already in scene in order to test these codes.</span><br />
<span style="font-family: 'Courier New',Courier,monospace;">#link two select-buttons with parent link.</span><br />
<span style="font-family: 'Courier New',Courier,monospace;">#for select-button, the target attribute value flag makes no sense.</span><br />
<span style="font-family: 'Courier New',Courier,monospace;">#you don't want to assign a custom link name here, since it is always sourcePickerItemName&gt;targetPickerItemName. &nbsp; &nbsp; &nbsp; &nbsp;</span><br />
<span style="font-family: 'Courier New',Courier,monospace;">newParentLink = mgp.MGPickerLink(s='selectButton1',t='selectButton2') &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><br />
<span style="font-family: 'Courier New',Courier,monospace;">print (&quot;The type for the link \&quot;&quot;+newParentLink+&quot;\&quot; is: &quot;+ mgp.MGPickerLink(newParentLink, q=True,type=True) + &quot;.\n&quot;)</span></p>
<p class="p_Normal" style="line-height: 1.0; white-space: nowrap; margin: 19px 0 0 0;"><span style="font-family: 'Courier New',Courier,monospace;">#link&nbsp;seelct-button&nbsp;to&nbsp;a&nbsp;attribute&nbsp;button,&nbsp;a&nbsp;attribute-link&nbsp;will&nbsp;be&nbsp;created.</span><br />
<span style="font-family: 'Courier New',Courier,monospace;">newAttrLink&nbsp;=&nbsp;mgp.MGPickerLink(s='selectButton1',t='attributeButton1',targetValues='Green,Red')</span><br />
<span style="font-family: 'Courier New',Courier,monospace;">print&nbsp;(&quot;The&nbsp;item&nbsp;selectButton1&nbsp;is&nbsp;linked&nbsp;and&nbsp;controlled&nbsp;by&nbsp;the&nbsp;item&nbsp;attributeButton1&nbsp;at&nbsp;values:&nbsp;\n&quot;)</span><br />
<span style="font-family: 'Courier New',Courier,monospace;">print&nbsp;(mgp.MGPickerLink(newAttrLink,q=True,targetValues=True))</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="mgpickeritem.htm"><img border="0" src="../common/images/MGtoolsHelp_previous.gif" width="34" height="22" alt="Previous" /></a>
<a href="mgpickermenu.htm"><img border="0" src="../common/images/MGtoolsHelp_next.gif" width="34" height="22" alt="Next" /></a></td>
</tr>
</table>
</body>
</html>