View Full Version : Switching tabs in the Render Settings Window
09-24-2007, 08:31 AM
Hello, would anyone know how to switch between the Common and mental ray tabs in the Render Settings window via mel?
The script editor does not display any mel commands being used when switching between the two even with 'echo all commands' switched on. Does this mean it is not possible?
not in front of maya now, but take a look at what command is invoked from the
Render with > mentalray and Render with > Maya Software menus.
//Returns the name of the current renderer.
These procedures are located in a script called supportRenderers.mel that ships with Maya.;)
09-24-2007, 10:50 PM
This works as well:
setAttr defaultRenderGlobals.currentRenderer -type "string" "mayaSoftware";
setAttr defaultRenderGlobals.currentRenderer -type "string" "mentalRay";
setAttr defaultRenderGlobals.currentRenderer -type "string" "mayaHardware";
09-25-2007, 02:51 PM
sorry, perhaps I did not make myself clear enough.
I dont want to switch between renderers, I want to switch between the tabs at the top of the Render Settings Window from 'Common' to 'Mental Ray' and vice versa.
09-26-2007, 08:08 AM
Why do you want to switch the tabs?
You can set your default render as written above and then acces all you attributes via mel.
setAttr "defaultRenderGlobals.imageFormat" 7;
will turn for every renderer the image format to IFF
setAttr "miDefaultOptions.caustics" 1;
is a mental ray only attribute that can be accessed directly when you set your renderer to mental ray
Maybe i don't get the point?!?
09-26-2007, 09:01 AM
ok, I basically want to assign some mel to a keyboard shortcut that will display the Common tab in the render settings window. It would be nice if it toggled between the mental ray tab in the render settings window and the Common tab.
I cant think of any other way of explaining this :)
I could screengrab the Maya Render Settings window if that would help?
int $index = 2;
string $renderer = `currentRenderer`;
$renderer = "masterLayer";
string $tabLayout = `getRendererTabLayout $renderer`;
tabLayout -e -sti $index $tabLayout;
paste this on a shelf/hotkey and just change the $index variable
to display a different tab.
if you don't use render layers, $index = 1 means the common tab
and $index = 2 means the renderer tab.
if you use render layers the $index goes through all the tabs as it
09-26-2007, 04:54 PM
09-26-2007, 04:54 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.