BenMiller_Early Workflow Layer Editor

Early Workflow Layer Editor


The Early Workflow Layer Editor (Download) - I've never really liked Maya's native layer editor. More often than not I find my projects cluttered with mysterious layers containing long forgotten groups that may or may not delete some crucial meshes elsewhere in my file. The font is small, the check boxes smaller, and there is very little information to take in at a glance. Probably the biggest problem with the default layers, even more annoying than it's refusal to accept the Enter or Escape keys, is my inability to keep my meshes organized during the prototyping portions of my workflows. Meshes change name when they combine, separate, extract, and duplicate and grouping serves primarily to organize pivots and scales, not to organize finished files.

The "Early Workflow" Layer Editor is designed specifically for those times when you just don't feel like naming your meshes every time you touch them. Its layers are designed to be temporary, disappearing with your session much like a painter's palette is washed (though I would like to implement a saving feature). Rather than ignoring the practicality of layers, I've tried to bring them out to the fore to be used much like groups in this more fluid way.  Because it was my attempt to relearn and optimize my programming habits in MEL, the interface is fully annotated and the coding flooded with comments. It's easily my cleanest and smoothest script so far and I'm eager to see how it works.

Mobility - One of the nifty things about my tool shelves is that they're not tacked to Maya's interface and I don't have to worry about cleaning up after myself if I move them around the screen. Having the layer editor just beyond my working area keeps me from losing track of them the way I do with Maya's layers and lets you put your peripherals to good use identifying and interpreting the colors of the interface without having to sift through Maya's clunky list.

Layers - Each layer is generated procedurally using the 'eval()' command (for anyone interested) and stores only object types to avoid the less visual nodes Maya tends to hold onto (this can be adjusted in the listing functions). The number of layers is chosen with the slider at the top of the window and can be adjusted at any time without deleting the interface, though removed layers will be emptied. Each time you create a layer, a text field is revealed and automatically selected so that you can quickly type a name if you would like. The central button of every layer displays the name of the layer (which can contain spaces and special characters!) and the number of items on the layer (updated when a layer is shown or hidden). Clicking that button will instantly select the contents of the layer. To the left is a toggle for visibility that will dim the entire layer and to the right is a clear/fill button that will empty and fill a layer.

Visibility - The visibility buttons use the built-in functions for showing and hiding objects rather than Maya's visibility override. I've become used to using the hide other and show all commands to quickly isolate models while I'm piecing them together and wanted to have some of that more natural toggle style available in my editor. Softly colored buttons and layer dimming makes them more legible.

Object Storage - I actually hid the stored objects on a hidden text object in each layer of the interface. The text object stores the output of a 'list -selected -objects' command and stores each element within the same string divided by a comma. Later, the 'stringToStringArray' function is used to parse that back into an array to be fed to the 'select' command again.

Generating Layers - The layers are generated using the 'eval()' command which runs a string when it's called.. The names of the elements of each layer are identical except for the number representing the layer so that I can call selectButton_1 or selectButton_2 using only the layer number. To allow layers to be saved even after being updated, I create the maximum number of layers (20 by default) when the script is first run and later hide and reveal their rowLayouts to add and remove them entirely. I left one or two alternative layer building structures in the code after I moved past them for anyone curious.

Defragging - Because the layers are temporary, deleting them will often leave gaps in the editor. I added a tab along the bottom that shifts the layers upward. It reveals layers that are moved so as to make it easier to transfer the layers up the interface without querying and copying quite as many variables.

Object Count - I edited in a function that updates the number of objects on a layer whenever you toggle its visibility. If the layer has at some point become emptied and you try to change the visibility, the layer is emptied and shaded a reddish purple to let the user know that it has been reset for that reason.

Colors - I've tried to choose colors that are both distinct from one another, making it easy to take take in your layers at a glance, and neutral enough to keep from distracting you in your work. Hidden layers are darkened, making active layers much easier to see and read.

Layer Names - This was a random feature I added in an edit to deal with the fact that all layers appear the same. I found I didn't always rename my layers, especially when I had been interrupted during a session and had to remake them. Instead, I figured that I might just make the associations and connections if the layers had different enough names. Maya uses "layer1", "layer2", "layer3" but I can't remember on the fly which of those I tossed a part into for a few minutes. After some testing, I decided to use entirely random words and to restrict myself to single words, not phrases, because they are more legible at a glance. The random words were chosen specifically to conjure up different images in your head so that you can use the layers without your own names as long as you remember which objects you put in "Hilltops" and which ones are in "Pips".