When building shader networks in the hypershade window it is common to drag-and-drop one node onto some attribute of another. When you do this maya attempts to guess the type of connection you are making. If you drag a texture or a material onto a color attribute then maya will automatically connect either the .outColor or the .outValue, depending on the node type. There are other default connections for other types of attributes but if maya can't figure out what to do it opens the connection editor and leaves it for you to make the connection manually.
There is one notable case that seems to confuse people - mia_material_x and mia_material_x_passes. For example say you want to layer mia_material_x over another shader using mib_color_mix or mix8layers. If you drag-and-drop the mia_material_x onto one of the color inputs instead of connecting as you might expect, up pops the connection editor. If you've done this before then you probably know that you simply need to connect mia_material_x.result, but wouldn't it be great if maya was able to do that automatically, and skip the connection editor?
If you said "yes, that would be great" then you'll like the next bit. Back around the turn of the century, the thoughtful folks at alias provided a mel script called connectNodeToAttrOverride.mel which states
// This procedure is provided as a hook for customers to allow
// you to redefine the behaviour of drag and drop.
Well that's what I've done. Three lines of code was all it took! Now dragging mia_material_x and mia_material_x_passes works just like the other materials.
You can download my modified connectNodeToAttrOverride.mel from my downloads page.
In maya 2010, if you connect a bump map to a mia_material_x shader and later change your mind and delete the bump map or break the connection, the shader will no longer render as you expect and the hypershade swatch will turn black. (more...)
We upgraded to maya 2010 this week so I have recompiled my 2nd favourite plugin - Michael Comet's poseDeformer. This is the windows x64 version. (x86 coming soon)
I added it to poseDeformer.rar on the Downloads Page.
Update 2 Oct 2009: Added maya2010 win32 (x86) compile to the download.
I was rummaging around Hamish McKenzie's zooToolbox the other night and uncovered the intriguingly named zooAttrScroller.mel
I'd never noticed this one before so I opened it up in my favourite code editor, notepad++, to see what it did, and soon worked out that you use it to create a virtual slider in the viewport so that you can change selected attributes by dragging left or right with the mouse.
Yes, I know, you can already do that by selecting the attributes in the channel box and dragging in the viewport. So, whats the difference? (more...)
Using a linear workflow always requires some gamma correction somewhere. If its within a maya shader network then you have some choices. The most obvious is maya's standard gammaCorrect node.

If you have maya2008 or 2009 then there is also mentalray's mip_gamma_gain node (which is hidden by default, but is easy to expose).

These two nodes perform the same basic function, with a few differences.
Maya's standard gammaCorrect enables independant gamma control of the three color channels.

While mr's mip_gamma_gain offers the simplicity of a single value gamma and throws in a gain control and a reverse switch for inverting the gamma value (saves you having to get the calculator to figure out the inverse of 2.2).

Until very recently, I had always used maya's gammaCorrect. And for one reason only - I like its colorful and meaningful hypershade swatch because it is easy to see in a busy hypershade window.

mentalRaySwatchGen
Now I'm starting to use mip_gamma_gain instead because it occured to me that I can modify mentalrayCustomNodeClass.mel ( in C:\Program Files\Autodesk\Maya2008\scripts\others) and get it to display a swatch that has one of those updating shader balls. That means I can see the actual result of the gamma change.


Although it makes the gamma nodes harder to find in the hypershade window, I'm finding the visual feedback useful.
If you want to try this, make a copy of mentalrayCustomNodeClass.mel into your local scripts folder and edit your local copy. The file has an obvious structure, so look for the "Internal MentalRay Nodes" section and add these lines after it.
if ($nodeType == "mip_gamma_gain" )
return "rendernode/mentalray/material:shader/surface:swatch/mentalRaySwatchGen";
You should also comment out the original reference to mip_gamma_gain.
A few weeks ago I saw this thread on cgtalk where Matt Estela offered a workaround for the slowness that we experience when using the hypershade when complex shaders or shaders with large file textures are involved. The update lag seems worse if some of the new mia shaders are involved. Matt's workaround is to simply disable the thumbnail updates while you are changing attribute values and to re-enable the updates again later when its more convenient.
I spent some time modifying a maya2008 sp1 mel script called hyperShadePanel.mel to add Matt's suggested workaround to a new button. Its the one with the little green shader ball icon in the center collumn as shown here

You can use it to toggle thumbnail updates on and off. You'll get one of those purple warnings in the info window to tell you the update state has changed.

You can download my modified version with the button icons from my downloads page. Put hyperShadePanel.mel in your local scripts folder and the xpm files in your icons folder and you'll get the new button when you restart maya.
Download here.
I previously uploaded an earlier mod version soon after reading the cgtalk post, but the button behavior was slightly awkward. This has been corrected now, so this note is for anybody who tried it before - its better now.
I've been playing with the new maya 2008 ext 2 muscle system. The old ext 1 muscles are now refered to as "simple" so I was not surprised at the apparant complexity of the ext 2 Muscle Creator UI. It's going to take some getting used to.
One thing that bugged me right from the start was the size of the frames in the lower half of the "Edit" tab of the UI. The default muscles have 5 basic controls but the frame only shows 2 and you need to scroll to get to the others, as you can see in this snapshot of part of the UI

I found this to be a major stumbling block as I tried to navigate my way around the various muscle cross-section curves and controls.
To make it easier I had to edit cMuscleCreatorUI.mel and now the same part of the UI looks like this

This makes it much easier to find things.
You can get my modified cMuscleCreatorUI.mel from the downloads page. It's not quite perfect though. I struggle a bit with the mel for formLayout. If you collapse one of the other tabs in the UI those fields will revert to their smaller size. To get them back again you have to close and reopen the UI. Oh well. Better than nothing.
Downloads it here.
If you downloaded my modified version of cMusclePaint.mel recently and you have since upgraded to maya2008 ext2 then you should download my updated version of cMusclePaint.mel
The cMusclePaint RAR file on the downloads page now contains both versions. Choose the one thats right for you.
Anyone who has tried the new maya muscle system would have to agree that the Paint Muscle Weights tool is a big improvement on the old Paint Skin Weights tool. The colored weight display now makes a lot more sense. I think we owe Michael Comet a big thank-you.
After playing with the Paint Muscle Weights tool, I noticed that I was stumbling each time I locked or unlocked weights. My modified version of cMusclePaint.mel addresses two issues.
1. The right-mouse-button menu for weight locking is too wordy and bordering on ambiguity. Here is a snapshot.

I'm sure I could learn to live with it, but there is too much unneccessary text here.
2. My preferred weight painting workflow involves locking all joints except two. I smooth between those two joints and then move on down the chain to the next two. This would involve at least two goes with that rmb-menu to lock a joint and unlock another.
So I changed a few lines in cMusclePaint.mel and now the interface looks like this.

In my opinion the menu is easier to read at a glance. The new "Unlock Selected...Lock the rest" function saves me a few mouse clicks. And the new "Unlock All" function does so while retaining the joint selection in the list.
Download here.
This post will only be of interest to anybody using the zoo space switching system which is integrated into Hamish McKenzie's zooCST and packaged with the zooToolbox. I recently added a zoo space switching walkthrough to the list of articles I have been writing about the zooToolbox, so I thought I would also add a post here about an extra feature I added to zoo space switching to make animating it easier.
If you are interested, click here.... (more...)