Tools/Free/egCustomScriptUI
From Osipa Entertainment
|
Wiki auto-generated by uMen.py on 1/27/2009. uMen is © 2009 Osipa Entertainment, LLC
All page contents are © Osipa Entertainment, LLC
egCustomScriptUI.mel
This mel script is meant to provide a few examples of how you would utilize the custom ScriptUI functionality of uMen.
The video is more of an overview, you'll need to read the code of each procedure to really get an understanding of what is happening. Don't worry - they're short.
Make sure as you use any custom scriptUIs, that they are either guaranteed to be sourced on startup ( custom startup functions can help with that ), or that the procedure name matches the script name (maya's handy little "script name same as proc name" sourcing trick) or, you'll need to source in the customScriptUI command itself:
source egCustomScriptUI; egCustomScriptUI_basic
On the python side of things it is very similar:
import egCustomScriptUI; egCustomScriptUI.basic
Demo & Training
Procedures
Global procedures available to be used
egCustomScriptUI_basic
Usage
egCustomScriptUI_basic "" "" ;
egCustomScriptUI_basic $file $tab ;
Synopsis
If you want to add a single tab to the scriptUIs which are created, this is what the code would look like
Variables
file, tab
| Name | Variable Type | Default value(s) |
| file | string | "" |
- The full path name for the file that the "current" scriptUI is built around
| tab | string | "" |
- The tabLayout from the scriptUI
Return Value
None
egCustomScriptUI_sourceControl
Demo & Training
Usage
egCustomScriptUI_sourceControl "" "" ;
egCustomScriptUI_sourceControl $file $tab ;
Synopsis
Without getting into too many details, this is a mockup of how you might write a source control tab into your scriptUI.
Test to see if the file is writeable - if so, open as normal, if not, present the source control tab
Variables
file, tab
| Name | Variable Type | Default value(s) |
| file | string | "" |
- The full path name for the file that the "current" scriptUI is built around
| tab | string | "" |
- The tabLayout from the scriptUI
Return Value
None
egCustomScriptUI_readOnlyCommand
Usage
egCustomScriptUI_readOnlyCommand "" "" ;
egCustomScriptUI_readOnlyCommand $file $op ;
Synopsis
Seperated out from sourceControl to make the attrib system command more legible
Variables
file, op
| Name | Variable Type | Default value(s) |
| file | string | "" |
- The file whose readOnly attribute to change
| op | string | +, - |
- Add or remove readOnly status
Return Value
None
egCustomScriptUI_multi
Usage
egCustomScriptUI_multi "" "" ;
egCustomScriptUI_multi $file $tab ;
Synopsis
If your goal is to add several tabs into the scriptUIs, one way to do that is to add a "hub" proc like this to call other layouts
Variables
file, tab
| Name | Variable Type | Default value(s) |
| file | string | "" |
- The full path name for the file that the "current" scriptUI is built around
| tab | string | "" |
- The tabLayout from the scriptUI
Return Value
None
Additional Information
Legals
Osipa Entertainment, LLC makes no guarantees or warranties related to download and/or use of any tools, mel and python scripts and plugins.
Although Osipa Entertainment provides some tools, mel and python scripts and plugins for free, it is it is prohibited to remove any of the documentation, copyright notices, and/or any references and links to Osipa Entertainment, LLC.
