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,88 @@
<!DOCTYPE html>
<html>
<head>
<title>Picker Tool Intergration</title>
<meta name="generator" content="Help &amp; Manual" />
<meta name="keywords" content="distribute picker,pipeline" />
<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", "pickertoolintergration.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="distributeinpipeline.htm"><img border="0" src="../common/images/MGtoolsHelp_previous.gif" width="34" height="22" alt="Previous" /></a>
<a href="publishinternet.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_Normal" style="font-family: Arial,'Lucida Sans Unicode','Lucida Grande','Lucida Sans';display:inline-block;width:13px;margin-left:-13px">&#9642;</span><span style="font-weight: bold;">Tips for controlling different MG-Picker Studio versions:</span></p><p class="p_Normal" style="text-indent: 0; line-height: 1.80; padding-left: 24px; margin: 0 0 0 24px;"><span class="f_Normal" style="font-family: Arial,'Lucida Sans Unicode','Lucida Grande','Lucida Sans';display:inline-block;width:24px;margin-left:-24px">&#9642;</span><span style="font-weight: bold;">Why we need to do that:</span><br />
A big studio might have its own software packing &amp; managing tool and version controlling system.<br />
So they need to be able to update MG-Picker Studio to use the newly-downloaded latest version or roll back to the older version of it.</p><p class="p_Normal" style="text-indent: 0; line-height: 1.80; padding-left: 24px; margin: 0 0 0 24px;"><span class="f_Normal" style="font-family: Arial,'Lucida Sans Unicode','Lucida Grande','Lucida Sans';display:inline-block;width:24px;margin-left:-24px">&#9642;</span><span style="font-weight: bold;">The problem we face:</span><br />
<span style="font-size: 9pt;">Currently, in Maya 2017+, MG-Picker Studio uses Maya's workspace control to autoload itself for a new Maya session.</span><br />
<span style="font-size: 9pt;">Problem is, for the UI script, was hard-coded to the actual path to the loader MEL script, it sources the MEL script and calls a MEL procedure to launch the UI.</span><br />
<span style="font-size: 9pt;">Next time you change to use the new version of MG-Picker Studio, the workspace control config still point to the old MEL path.</span><br />
<span style="font-size: 9pt;">So that means in Maya, you might have the old version already loaded, yet try to load the new version of the tool, which might result in an error.</span></p><p class="p_Normal" style="text-indent: 0; line-height: 1.80; padding-left: 24px; margin: 0 0 0 24px;"><span class="f_Normal" style="font-family: Arial,'Lucida Sans Unicode','Lucida Grande','Lucida Sans';display:inline-block;width:24px;margin-left:-24px">&#9642;</span><span style="font-weight: bold;">How to solve the problem:</span><br />
Starting from MG-Picker Studio v1.83, setup env variable called: &nbsp;MGPICKER_PROGRAM_FILE_DIR , <br />
set its value to the path to <span style="font-style: italic;">MGPicker_Program</span> directory, which contains the loader MEL file called &quot;MGPicker_WrittenByMiguel.mel&quot;.<br />
The test of env is included in the UI script of workspaceControl so will be used prior to the original MEL path. <br />
example in python code to set the environment variable:<br />
<span style="color: #748c43;">import os</span><br />
<span style="color: #748c43;">os.environ[&quot;MGPICKER_PROGRAM_FILE_DIR&quot;] = '/path/to/MGPicker_Program'</span><br />
* For maya 2016 or earlier, the feature is not supported, you need to uninstall and reinstall the tool.</p><p class="p_Normal" style="text-indent: 0; line-height: 1.80; padding-left: 24px; margin: 0 0 0 24px;"><span class="f_Normal" style="font-family: Arial,'Lucida Sans Unicode','Lucida Grande','Lucida Sans';display:inline-block;width:24px;margin-left:-24px">&#9642;</span>The actual MEL code to launch MG-Picker: (python code works alike)</p><div style="text-align: left; line-height: 1.80; padding: 0 0 0 0; margin: 0 0 0 48px;"><table style="border:none; border-spacing:0;">
<tr>
<td style="vertical-align:top; padding:0; border:none"><p class="p_Normal"><span style="font-size: 9pt; color: #748c43;">string $mgpicker_programDir = `getenv &quot;MGPICKER_PROGRAM_FILE_DIR&quot;`;</span></p>
<p class="p_Normal"><span style="font-size: 9pt; color: #748c43;">if(`filetest -d $mgpicker_programDir`)</span></p>
<p class="p_Normal"><span style="font-size: 9pt; color: #748c43;">{</span></p>
<p class="p_Normal"><span style="font-size: 9pt; color: #748c43;"> &nbsp; &nbsp;eval (&quot;source \&quot;&quot;+$mgpicker_programDir+&quot;/MGPicker_WrittenByMiguel.mel&quot;+&quot;\&quot;&quot;);</span></p>
<p class="p_Normal"><span style="font-size: 9pt; color: #748c43;">}</span></p>
<p class="p_Normal"><span style="font-size: 9pt; color: #748c43;">else</span></p>
<p class="p_Normal"><span style="font-size: 9pt; color: #748c43;">{ </span></p>
<p class="p_Normal"><span style="font-size: 9pt; color: #748c43;"> &nbsp; &nbsp;eval (&quot;source \&quot;/thePathTo/MGPicker_Program/MGPicker_WrittenByMiguel.mel\&quot;&quot;); &nbsp; &nbsp;// Change to real path, this is a fallback path!</span></p>
<p class="p_Normal"><span style="font-size: 9pt; color: #748c43;">}</span></p>
<p class="p_Normal"><span style="font-size: 9pt; color: #748c43;">MG_PickerStudio 1; &nbsp; &nbsp; // Use MG_PickerStudio 0 to launch in designer mode!</span></p>
</td>
</tr>
</table>
</div>
<p class="p_Normal" style="text-indent: -24px; line-height: 1.80; margin: 0 0 0 48px;">&nbsp;</p>
<p class="p_Normal" style="text-indent: 0; line-height: 1.80; padding-left: -11px; margin: 0 0 0 24px;"><span class="f_Normal" style="font-family: Arial,'Lucida Sans Unicode','Lucida Grande','Lucida Sans';display:inline-block;width:13px;margin-left:-13px">&#9642;</span><span class="f_Heading1" style="font-size: 10pt;">How to setup different config root dir:</span><br />
Starting from MG-Picker Studio v2, the environment variable MGPICKER_USER_CONFIG_DIR is no longer supported to avoid over-complicating things, the user config root dir is always the OS specific user config directory. In designer mode, you can go to Picker/Browse/Browse User Config Dir to browse the folder.</p><p class="p_Normal" style="text-indent: -24px; line-height: 1.80; margin: 0 0 0 48px;">&nbsp;</p>
<p class="p_Normal" style="text-indent: 0; line-height: 1.80; padding-left: -11px; margin: 0 0 0 24px;"><span class="f_Normal" style="font-family: Arial,'Lucida Sans Unicode','Lucida Grande','Lucida Sans';display:inline-block;width:13px;margin-left:-13px">&#9642;</span><span class="f_Heading1" style="font-size: 10pt;">How to setup MG-LicenceConnector dir:</span><br />
Starting from MG-Picker Studio v1.83, set up an environment variable called: &nbsp;MGPICKER_FLOAT_LIC_CONNECTOR_DIR , to the path that contains MG-LicenceConnector executable.<br />
You can also set up the &quot;licenseConnector&quot; value in the server config file MGPicker_ServerConfig/ServerConfig.txt</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="distributeinpipeline.htm"><img border="0" src="../common/images/MGtoolsHelp_previous.gif" width="34" height="22" alt="Previous" /></a>
<a href="publishinternet.htm"><img border="0" src="../common/images/MGtoolsHelp_next.gif" width="34" height="22" alt="Next" /></a></td>
</tr>
</table>
</body>
</html>