Managing numerous and complex MEL scripts and plug-ins can become difficult and inconsistent in production environments. The following steps will ensure that your MEL scripts get sourced and your plug-ins will get loaded without error and with consistency throughout your production environment.
4) There might be a time when you want to have 2 versions of a script:
A good example of this is the
i) V1 --> when a certain plug-in is loaded.
ii) V2 --> when certain plug-in is not loaded.
You can use the userSetup.mel as the entry point for deciding what gets loaded. One way of doing this would be to allow Maya to start up and then from inside the userSetup.mel call a global proc that will run a check on which plug-ins are loaded or should be loaded. You can also make use of the environment variables to store certain paths or trigger certain events.
For more working examples look at the integration of scripts and plug-ins inside the bonus tools pack.
Comments