Switching tabs in the Render Settings Window

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  09 September 2007
Switching tabs in the Render Settings Window

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?

  09 September 2007
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.
  09 September 2007
  //Returns the name of the current renderer.

These procedures are located in a script called supportRenderers.mel that ships with Maya.
Can you repeat the part of the stuff where you said all of the things?
  09 September 2007
This works as well:

 getAttr defaultRenderGlobals.currentRenderer;

 setAttr defaultRenderGlobals.currentRenderer -type "string" "mayaSoftware";
 setAttr defaultRenderGlobals.currentRenderer -type "string" "mentalRay";
 setAttr defaultRenderGlobals.currentRenderer -type "string" "mayaHardware";
  09 September 2007
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 September 2007
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 September 2007
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?

  09 September 2007

int $index = 2;

string $renderer = `currentRenderer`;
if (`isDisplayingAllRendererTabs`)
	$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 September 2007
  09 September 2007
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 06:29 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.