<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Environment Variables Setup Frustrations in Maya Forum</title>
    <link>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5298029#M73251</link>
    <description>&lt;P&gt;OK, can you do the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Restart Maya&lt;/P&gt;&lt;P&gt;2) Type this into the script window:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; getenv MAYA_PLUG_IN_PATH;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;SHAPESBrushUI;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) Copy the entire contents of the script window output and paste it into a new text file. Then attach that text file to this post so I can see the actual script output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
    <pubDate>Thu, 25 Sep 2014 13:48:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-09-25T13:48:05Z</dc:date>
    <item>
      <title>Environment Variables Setup Frustrations</title>
      <link>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5273907#M73227</link>
      <description>&lt;P&gt;I can't run any third party script without the error "cannot find procedure".&amp;nbsp; My Maya Environment variable points to a path where my scripts, icons even presets should be placed.&amp;nbsp; When I place any scripts in the scripts path, then try to run those scripts I get the error ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Sep 2014 03:47:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5273907#M73227</guid>
      <dc:creator>FalconCrest</dc:creator>
      <dc:date>2014-09-15T03:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Variables Setup Frustrations</title>
      <link>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5276687#M73228</link>
      <description>&lt;P&gt;Hi Falcon&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you elaborate a little bit on what you are doing here? What is the 3rd party software you are trying to run? Are you running a MEL script or a Python script, or do you need to load any plug-ins prior to using the 3rd party software?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Often issues like this can be that you need to place scripts in the scripts folder and then &lt;STRONG&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;rehash&lt;/SPAN&gt; &lt;/STRONG&gt;the script path. A simple way of ensuring this to just restart Maya once you have copied the scripts into the scripts folder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you can provide any more info I may be able to help a little more&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Tue, 16 Sep 2014 07:45:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5276687#M73228</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-16T07:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Variables Setup Frustrations</title>
      <link>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5277467#M73229</link>
      <description>&lt;P&gt;I have a folder on my drive, lets call that folder &amp;lt;Maya_Stuff&amp;gt; within that folder is another folder called &amp;lt;scripts&amp;gt; all MEL scripts that I want to use are placed within the &amp;lt;Maya_Stuff&amp;gt;\&amp;lt;scripts&amp;gt; folder if there are any icons that belong to the script they are in a subfolder of &amp;lt;Maya_Stuff&amp;gt; called &amp;lt;icons&amp;gt;.&amp;nbsp; In my Maya.env file I have the following environment variables setup;&lt;BR /&gt;&lt;BR /&gt;MAYA_SHELF_PATH = :\Maya_Stuff\Scripts \\ For any and all Script files&lt;BR /&gt;XBMLANGPATH = :\Maya_Stuff\Icons \\ For any and all icon files that may belong to the scripts&lt;BR /&gt;&lt;BR /&gt;Most, if not all scripts require you to run a command to execute the script, whether you do that manually in Maya command line window or if you create a shelf icon, in this example suppose I run a command for a script manually in Maya command line window; and that command is called "acme.mel".&amp;nbsp; I run "acme.mel" but I'm being informed that the procedure cannot be found yet the mel script is located in the :\Maya_Stuff\Scripts folder ?&lt;BR /&gt;&lt;BR /&gt;This is the issue I am having, you can setup environment variables for Maya if you want to place things outside of Maya default locations, especially when upgrading Maya or upgrading scripts everything is kept organized, easier to maintain,&amp;nbsp; that is not the case with my setup. I hope you or someone else can help so that any plugins or scripts that I install now, or in the future do not surface this problem, thank you !&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Sep 2014 14:07:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5277467#M73229</guid>
      <dc:creator>FalconCrest</dc:creator>
      <dc:date>2014-09-16T14:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Variables Setup Frustrations</title>
      <link>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5277575#M73230</link>
      <description>&lt;P&gt;Hi Falcon&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It just looks like you are using the wrong environment variable. Instead of using MAYA_SHELF_PATH you need to use MAYA_SCRIPT_PATH.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Tue, 16 Sep 2014 14:38:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5277575#M73230</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-16T14:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Variables Setup Frustrations</title>
      <link>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5278781#M73231</link>
      <description>&lt;P&gt;Sorry, that should have read MAYA_SCRIPT_PATH !&lt;/P&gt;</description>
      <pubDate>Tue, 16 Sep 2014 22:12:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5278781#M73231</guid>
      <dc:creator>FalconCrest</dc:creator>
      <dc:date>2014-09-16T22:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Variables Setup Frustrations</title>
      <link>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5278915#M73232</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for posting to The Area Forums.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A couple of things to take into consideration&amp;gt;&lt;BR /&gt;&lt;BR /&gt;First, i&lt;SPAN&gt;f you choose to define both a custom script path and a custom shelf path (that is, you set both MAYA_SHELF_PATH and MAYA_SCRIPT_PATH), the MAYA_SHELF_PATH must be listed first (before MAYA_SCRIPT_PATH) in&amp;nbsp;&lt;/SPAN&gt;&lt;SAMP id="GUID-228CCA33-4AFE-4380-8C3D-18D23F7EAC72__GUID-FB0C5385-DD12-4227-BDB3-C6D0B3C6DC6C" class="ph codeph"&gt;Maya.env&lt;/SAMP&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I didn't see that you had the shelf environment variable in your Maya.env file but I figured I would point that out.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second, where are you keeping your Maya.env file? It should exist in the following directory:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Windows:&lt;/P&gt;
&lt;P&gt;drive:\Documents and Settings\username\My Documents\maya&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mac:&lt;/P&gt;
&lt;P&gt;/Users/username/Library/Preferences/Autodesk/maya&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Linux:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;~/maya&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can check to see if Maya is reading the Maya.env file by using the getenv command in Maya to check for the MAYA_SCRIPT_PATH variable as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;getenv "&lt;SPAN&gt;MAYA_SCRIPT_PATH";&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I hope that is helpful.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Sep 2014 23:15:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5278915#M73232</guid>
      <dc:creator>santd</dc:creator>
      <dc:date>2014-09-16T23:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Variables Setup Frustrations</title>
      <link>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5279131#M73233</link>
      <description>&lt;P&gt;Sorry I didn't mention, I set MAYA_APP_DIR in my Windows environment settings which contains a custom location for my maya.env file which is stated in the documentation.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Sep 2014 03:14:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5279131#M73233</guid>
      <dc:creator>FalconCrest</dc:creator>
      <dc:date>2014-09-17T03:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Variables Setup Frustrations</title>
      <link>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5284431#M73234</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you try doing a getenv to see if Maya is picking up the proper value of your environment variable?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another thing to try is reversing the slashes in your path sometimes Maya prefers them one way over the other.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Fri, 19 Sep 2014 00:27:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5284431#M73234</guid>
      <dc:creator>santd</dc:creator>
      <dc:date>2014-09-19T00:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Variables Setup Frustrations</title>
      <link>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5284645#M73235</link>
      <description>&lt;BR /&gt;C:/Custom Settings/Maya_Resources/scripts;&lt;BR /&gt;I ran getenv "MAYA_SCRIPT_PATH";&lt;BR /&gt;C:/Custom Settings/Maya_Resources/scripts;&lt;BR /&gt;the above path is where all my scripts are located. There is also;&lt;BR /&gt;C:/Custom Program Settings/Maya_Resources/Preferences/scripts;&lt;BR /&gt;The difference between the second file scripts path is the script I want to run has a lock attached to it, if that means anything ?&lt;BR /&gt;&lt;BR /&gt;The script I want to use, requires that I run a mel script from the command line, when I run that script I get the error; Cannot find procedure &amp;lt;name of mel script&amp;amp;gt; which means as you and I both know, that the script file can't be found, but the environment variable looks clean, as in, it's setup correctly as far as I'm aware.&lt;BR /&gt;&lt;BR /&gt;Either file path doesn't work !&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Sep 2014 04:50:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5284645#M73235</guid>
      <dc:creator>FalconCrest</dc:creator>
      <dc:date>2014-09-19T04:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Variables Setup Frustrations</title>
      <link>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5290069#M73236</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think at this point we should test if it is your script or the path that isn't working. I have created testScript that when called will print "This script is working" place the attached mel script in your custom path and then launch Maya and in the Script Editor type testScript and run it to see if it prints "This script is working".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since your script has a lock attached to it, it's possible that there are some permissions or security setttings applied to it which are not allowing access.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Mon, 22 Sep 2014 17:32:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5290069#M73236</guid>
      <dc:creator>santd</dc:creator>
      <dc:date>2014-09-22T17:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Variables Setup Frustrations</title>
      <link>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5291207#M73237</link>
      <description>&lt;P&gt;I put the script in the custom path that I created for which all my scripts are to be placed outside of the default maya path.&amp;nbsp; As it goes, there is a environment variable set on my system, that environment variable is set to read the maya.env file that is placed in once again,&amp;nbsp; a custom path on my computer, from there the environment variable tells maya where to look for icons, scripts and so forth, which are all custom paths on my system.&amp;nbsp; I placed the script you suplied, thank you once again, in my custom script path, I ran the mel script in maya command line and I got the message; the script is working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the looks of it, I have setup everything correctly, therefore there must be something wrong with the scripts that I want to call themself, unless I'm missing something which at stage I'm positive I'm not ? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Sep 2014 02:03:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5291207#M73237</guid>
      <dc:creator>FalconCrest</dc:creator>
      <dc:date>2014-09-23T02:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Variables Setup Frustrations</title>
      <link>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5291599#M73238</link>
      <description>&lt;P&gt;Hi again Falcon&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I don't know the ins-and-outs of what your scripts do I can't be sure about this but one thing you may have missed is that in order for you to be able to directly call a function within a script in the way you have described, the &lt;STRONG&gt;function must have the same name as the script&lt;/STRONG&gt;. Otherwise Maya will not know that the function exists.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Otherwise you need to "source" the script using the &lt;SPAN style="font-family: courier new,courier;"&gt;source&lt;/SPAN&gt; command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Take the two examples below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #ff0000;"&gt;&amp;lt;File://MyTest1.mel&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp; global proc MyTest1() &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Hello";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #ff0000;"&gt;&amp;lt;/File&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #ff0000;"&gt;&amp;lt;File://MyTest2.mel&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp; global proc MyFunction() &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Hello";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #ff0000;"&gt;&amp;lt;/File&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If both of these files were placed somewhere in your script path, only the first one could be directly called without a source statement. The second one would need to be sourced before the function was usable. i.e.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;MyTest1();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #339966;"&gt;// Hello&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;MyFunction();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #339966;"&gt;// Error: line 1: Cannot find procedure "MyFunction". // &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So instead you need to do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;source MyTest2.mel;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;MyFunction();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #339966;"&gt;// Hello&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Tue, 23 Sep 2014 07:53:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5291599#M73238</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-23T07:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Variables Setup Frustrations</title>
      <link>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5292321#M73239</link>
      <description>Sorry, I don't understand. Are you saying if there are any functions in the script without the same name as the script, the script won't run ?</description>
      <pubDate>Tue, 23 Sep 2014 13:24:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5292321#M73239</guid>
      <dc:creator>FalconCrest</dc:creator>
      <dc:date>2014-09-23T13:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Variables Setup Frustrations</title>
      <link>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5292653#M73240</link>
      <description>&lt;P&gt;OK, I'll try to explain.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maya only compiles scripts it needs, at the moment that it needs them. This is for performance reasons.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The way scripts are compliled by Maya is by using the &lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;source&lt;/STRONG&gt; &lt;/SPAN&gt;command. Docs &lt;A href="http://download.autodesk.com/global/docs/maya2014/en_us/Commands/source.html" target="_blank"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calling source actually compiles and executes the contents of the script. When this happens, all functions that exist in the script are created in the Maya runtime environment, making them "available" to call. So you can call any global function from that script once its been sourced.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is also a clever shortcut built into Maya which allows you to name a function in a script with the same name as the script. If you do this Maya detects it at startup (different to sourcing). All you have to do is call the name of the script/function and Maya will actually source the entire script at that point.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So in the example below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #ff0000;"&gt;&amp;lt;File://MyFunctions.mel&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp; global proc Func1() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Function 1";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp; global proc Func2() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Function 2";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp; global proc MyFunctions() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Main Function Has Been Run!";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #ff0000;"&gt;&amp;lt;/File&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming this file were in your MAYA_SCRIPT_PATH, you would get the following results:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;Func1();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;// Error: line 1: Cannot find procedure "Func1". // &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is because the script wasn't sourced. So you need to either source the script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;source MyFunctions;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or just call the main function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;MyFunctions();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;//&amp;nbsp;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;Result: &lt;/SPAN&gt;Main Function Has Been Run!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now all of the functions are available from the script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;Func1();&lt;BR /&gt;// Result: Function 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;Func2();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;// Result: Function 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;I hope this helps to clarify things&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Mike&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Sep 2014 14:43:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5292653#M73240</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-23T14:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Variables Setup Frustrations</title>
      <link>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5293877#M73241</link>
      <description>Your explanation is good, and I enjoyed reading it. I understand you can give functions the same name as the script; what I don't understand but you did explain the problem I am having with a script is if the script is firing this error:&lt;BR /&gt;//Error: line 1: Cannot find procedure "&amp;lt;name of script.mel&amp;gt;&lt;BR /&gt;How do I source the script, by simply;&lt;BR /&gt;source &amp;amp;lt;script.mel&amp;gt;; ?&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Sep 2014 22:13:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5293877#M73241</guid>
      <dc:creator>FalconCrest</dc:creator>
      <dc:date>2014-09-23T22:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Variables Setup Frustrations</title>
      <link>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5293955#M73242</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the easiest solution if your main global proc name doesn't match the name of your script is to simply rename the script file so that it matches the global proc name then you should just be able to call it from Maya by typing the name and excecuting it in MEL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you would like you can attach the script for us to test or take a look at.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Tue, 23 Sep 2014 23:09:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5293955#M73242</guid>
      <dc:creator>santd</dc:creator>
      <dc:date>2014-09-23T23:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Variables Setup Frustrations</title>
      <link>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5294501#M73243</link>
      <description>&lt;P&gt;Hi Falcon&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yeah you can just source it by typing:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-family: courier new,courier;"&gt;source "scriptName.mel"&lt;/SPAN&gt; (with or without the ".mel" bit works fine)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you run it and are getting this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; color: #ff0000;"&gt;// Error: Line 1.11: Cannot find file "scriptName" for source statement. // &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it means the script is not in the MAYA_SCRIPT_PATH and the issue could be with your environment setup.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you get no error it means the script was sourced successfully and all functions should be available.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If, after you have sourced it you are still getting an error when trying to call the procedure you want to use, then the issue is with the script itself and not your environment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As David said in the previous post, you would need to attach your script for us to be able to offer any further help on the issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Wed, 24 Sep 2014 07:53:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5294501#M73243</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-24T07:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Variables Setup Frustrations</title>
      <link>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5295637#M73244</link>
      <description>&lt;P&gt;I ran the script using multiple variations, including with and without quotes.&amp;nbsp; In all varations, I got no error, but the script did not run ?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Sep 2014 15:30:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5295637#M73244</guid>
      <dc:creator>FalconCrest</dc:creator>
      <dc:date>2014-09-24T15:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Variables Setup Frustrations</title>
      <link>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5295665#M73245</link>
      <description>&lt;P&gt;I think its best that you post the script here so we can try to help you. Otherwise we're going to keep going round in circles. Also the output of your script window would be helpful too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Wed, 24 Sep 2014 15:38:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5295665#M73245</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-24T15:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Variables Setup Frustrations</title>
      <link>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5295677#M73246</link>
      <description>&lt;P&gt;I'm in direct communication with the Author of this tool whom has told me to try placing the script files in Maya default path; maybe someone here can find a solution or there is an issue with the script ?&lt;BR /&gt;[&lt;A target="_blank" href="http://www.braverabbit.de/playground/?p=1238"&gt;Script&lt;/A&gt;]&lt;/P&gt;</description>
      <pubDate>Wed, 24 Sep 2014 15:43:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/environment-variables-setup-frustrations/m-p/5295677#M73246</guid>
      <dc:creator>FalconCrest</dc:creator>
      <dc:date>2014-09-24T15:43:39Z</dc:date>
    </item>
  </channel>
</rss>

