Tools/Free/egTrickle
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
egTrickle.mel
This script is meant for you to manipulate and then use via the uMen menu. By removing/renaming the procedures in this script one by one, you will be able to see exactly how it is that the trickle-down logic of the uMen system works. First, simply run this script by pressing the menuItem ( not the option box ) called "egTrickle.mel" in uMen. That should have run egTrickle_menuItem.
If you now delete egTrickle_menuItem and run the tool from uMen again, you should see a different result: egTrickle_window.
Leave that window open, and now rename/delete egTrickle_window. Run the menuItem again and notice how it created almost the same thing - only this time with a menuBar provided by the uMen tool with some handy little extras.
You know what is next, rename or delete egTrickle_layout and then in maya, press uMen again. This time, you were taken to a window with a menu with some handy features built into it - MORE stuff, for LESS work.
Go ahead and get rid of or rename egTrickle_layout, and run the tool again, and this time you should have gotten the scriptUI. uMen found that there was a tool of the same name as the script, and tried to run it, but saw that there were arguments, and so assumed that the tool would not work, so it took you to the scriptUI where you at least have the textfields and variable buttons to work with.
Lastly, delete/rename egTrickle, and then change the name of egTrickleX to egTrickle (making it the new egTrickle). You'll need to source it first or run the menuItem twice, but once you do - now the behavior of the menuItem is to run the tool, because it has no arguments, and so will probably work just run all by itself.
The recommended naming/usage is this:
- Always have a tool named the same as the script, which is the version that needs args
- If the tool is "simple", have a _menuItem version which is selection-based, for easiest use - if it will usually need a UI, don't create a _menuItem
- If the tool could ever need some options changed, have a _layout which will always be available if people press the optionBox, and will be put into it's own window if a user just presses the menuItem.
Most OE tools have layouts, and no menuItems
Demo & Training
Procedures
Global procedures available to be used
egTrickleX
Usage
egTrickleX ;
Synopsis
No description available
Return Value
None
egTrickle
Usage
egTrickle { "" } 0 ;
egTrickle $objects $divisions ;
Synopsis
In the absence of menuItems, windows and, layouts this will be run when you press the egTrickle menuItem in the uMen menu
This is just a simple wrapper for the polySmooth command with some simple error-checking and respect for the original selection
Variables
objects, divisions
| Name | Variable Type | Default value(s) |
| objects | string[] | { "" } |
- A list of polygonal objects to smooth
| divisions | int | 1, 2, 3, 4, 5 |
- The number of divisions to send the smooth command
Return Value
None
egTrickle_layout
Usage
egTrickle_layout ;
Synopsis
In the absence of menuItems and windows, egTrickle_layout will be attempted when you press egTrickle.mel as a menuItem. The layout proc is a good place to put "instructions" on your tool, because in the case that you rely on uMen and the layout proc, then the tool documention will also include the doc stuff you write here, like so:
Description: All this does is use the polySmooth command as an example of how to use various uMen procedure naming conventions.
Instructions: 1 ) Select one or more polygon objects 2 ) Type in ( or press the button to increment ) a number of divisions to smooth 3 ) Press the smooth button and watch the magic
Return Value
None
egTrickle_window
Usage
egTrickle_window ;
Synopsis
In the absence of menuItems, this will be attempt two when you press egTrickle.mel as a menuItem in uMen menu.
Return Value
None
egTrickle_menuItem
Usage
egTrickle_menuItem ;
Synopsis
This will be the first procedure run with uMen trickle-down logic when you press egTrickle.mel as a menuItem in uMen menu. If you have a poly object selected, this will smooth it, with a "default" divisions setting of 1.
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.
