Fixing the Hypershade create panel in Maya 2012

This bug has been fixed for Maya 2013.

In the current version of Maya 2012, even with the Hotfix 1 applied, the Hypershade tends to have it’s own mind and likes to ignore any custom set width of the create panel. Any time the Hypershade is opened the create panel presents it’s full beauty by occupying more than half of the entire Hypershade window.

The error can be tracked down to the single fact that the internally stored width of the window, that is set when the window is closed, is not read back properly and leads to a wrong calculation of the window size and it’s contained panels. The assumption is that the actual drawing of the window and the setting of the size based on the preferences is happening in the wrong order, leading to the faulty behavior.

Nevertheless, the problem can be solved by making the particular script read the stored window preferences in the user settings folder, rather than the system variable.

The script responsible for creating and drawing the Hypershade is “hyperShadePanel.mel” in the “scripts/others” directory of the Maya.

The following line needs to be edited (at the end of the script; inside the “setHyperShadeCreateBarPaneSize” procedure)

int $paneLayoutWidth = `paneLayout -q -width $hyperShadePaneLayout`;

and replaced with the following code:

int $paneLayoutWidth = `windowPref -q -width hyperShadePanel1Window`;


You can download the modified script here: hyperShadePanel.mel

Place it in one of the user script directories that Maya will scan during startup. This way the original script stays in place (just for safety reasons) but the copy will still get evaluated after all scripts in the application folder.

Categories
Search