enjoyMentalRayStringOptions, a UI to easely use MR string options


hi nbreslow, until Narann gets a chance to do a proper update you can comment out the redundant stuff.

I was not too careful, mostly i wanted the IS stuff for object lights. here is what i had ended up with. Maybe Narann can tell you if i missed something


I think AD added a string option with a default value I didn’t deal with (the “false” one).


I’ve just launched my script with Maya 2014 and don’t have any problem. :frowning:

Can someone send me a scene reproducing the problem please? :slight_smile:


when i tested it it, i just had the default scene open, no objects in the scene but the mr plugin was loaded and iirc i had the globals menu open



I think I pinpointed the problem. I am using the community UI posted on the Elemental Ray forum here and when I remove those scripts yours works as expected. Not sure if you can test against this but it would be great to have both these working together. Sorry I didn’t mention it earlier but I used your script and the previous 2013 community UI without issue. Hope that helps!



This really help me. I will test this. :slight_smile:


I’ve pointed the problem: maya-render-settings-mental-ray UI create this value by default:

“environment lighting mode” “false”.

The problem is that “false” was not in the official documentation:


“environment lighting mode” “off”|“automatic”|“approximate”|“light”

I can create a special case to deal with that but I would like to know MR community UI guys opinion on this before do anything. :slight_smile:

I think “false” is a “valid value” for mental ray (it understand it as “off”) but IMHO, we should follow the documentation specs and use “off”.

For the others, add this two line (at 1078):

				# add elements
				for value in stringOption.valueList :
					cmds.menuItem( label=value )
+				if stringOption.name == "environment lighting mode" and stringOption.value == "false" :
+					stringOption.value = "off"
				# select element
				cmds.optionMenuGrp( curOptionMenuGrp, edit=True, value=str(stringOption.value) )

This seems to work with me. :buttrock:


Hi Narann,

Works for me too! Script is running (haven’t tested anything really though, just got the window to pop up). Thanks for fixing it. I bet the MR community UI guys(depending on how busy they are) could probably give you some definitive answers - it has been out for a few weeks.

One small thing - You version numbers…in the script header the version is listed as .97, in the script header change list it shows it is up to .98 and the script window itself shows .96. Just wanted to let you know.

Will check back in and thank you so much for this script - it has proved very useful!



I’ve send a bug report here to ask them what to do:


The answer for now is “accepted”. I suppose they will change this from their side. :slight_smile:
I will keep an eye on commit list and see if they do the change.

I just realize yes. :slight_smile:
I will do both at the same time when I will do the fix. :slight_smile:

I’m happy it help you. :slight_smile:


Great script! But I wish you hadn’t used tab characters. :frowning: Makes it difficult to edit.


Well I found a quick way in notepad++ to replace all the tab characters with white spaces. Much easier to add to it now. :slight_smile: Really like your classes by the way, great approach. Very easy to extend the functionality.


Hard problem I know. ^^’

That was the point when I created it: Easy to add stuff. :slight_smile:


Once I found that nifty notepad++ plugin it was all good. Swapped all tabs for white space and now all is right with the world. :slight_smile: Those indentation errors make me want to pull my hair out. lol.


how to make maya shaders seen iray


@Redsand: For future reference, try EditPad Lite for stuff like this. It’s just devastating! :slight_smile:


You can’t… Why would you want to if you’re using iray? Iray isn’t meant for biased rendering. Just use mentalray if you want to use Maya shaders.


Please don’t use Maya Common Shaders in anything. . . :wink:


Hi there,

 Thanks very much for creating this script, I have found it extremely useful for accessing string options easily.
 Just a heads up, if you are using the public render settings scripts for Maya 2014:
 Then upon running the enjoy mental ray string options script, you get this error message:
 # Error: RuntimeError: file X:/myDocuments/maya/scripts\enjoyMentalRayStringOptions.py line 1079: Item not found: false
 And the script window fails to open (this is in Maya 2014 service pack 2). The script works fine in vanilla Maya 2014 sp2.
 Also I noticed when checking if I had the latest version of your script, that the creative crash download version was out of sync with this cg talk dowload version. 
 Anyway, certainly not complaining! Just reporting issues.
 Thanks again


I think you may have already encountered this issue a few posts earlier.

Apologies for not reading the above replies first!



As you said, this a problem that has been solved. :slight_smile:

I need to take time to update the creative crash version too. :slight_smile:


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.