Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
We recently upgraded to 2012 at work (working on 2009 since then)
and with all the new features coming with mentalRay 3.9 that where not exposed in the UI, I choose to blow my brain out and add all new (and old) non exposed string options into the Render Settings window !
I know there are already script that enable string options (like Dorian's one), but my goal was to do it exactly the same way as if autodesk had done it itself. Nothing to source, nothing to do, it's here, just like if autodesk had done his job !
And I tried to respect syntax, naming convention and every thing else.
All new string options are added the same way they were before (declared in 3 global string array in mentalRayUi.mel) so they are created with the node miDefaultOption.
New tabs, new layout, new controls, and everything I changed is done the way it was before.
I really felt like an archaeologist while trying to understand all mel file, looking in the folder /script/others for every procedure call and global variable usage to find where everything was natively created.
Here is some UI behavior that was kept (even if everything should have been kept, I may have forgotten a few things):
- Modifying the UI updates the string (of course ...) and modifying the string by hand also updates the UI.
- When a function disable (or enable) another (as referred in mentalRay documentation), controls are greyed as well to match what the render setting is already doing for other controls.
- As every added thing is disabled by default, their UI is also folded by default to ensure it's not an invasive modification.
- All string options are now saved with the render setting preset. (All previously used string option (e.g. for IP) were not saved with preset !).
- All controls are annoted (using uiRes) with information taken from mentalRay documentation.
Here is the list of all modification I made :
- adding Key differentials under Features Tab (even if I don't now what it is ...).
- adding Unified Sampling under Quality Tab.
- adding Progressive rendering under Quality Tab.
- adding Native IBL under Indirect Lighting Tab.
- adding FinalGather Legacy under Indirect Lighting Tab.
- adding FinalGather passes Legacy under Indirect Lighting Tab.
- modifying FinalGather mode under Indirect Lighting Tab (the control now match the one in miDefaultOptions).
- adding Iray Tab.
AND the last but not the least !
-All tab are now resizable ! When you stretch the render setting horizontally, the scroll layout stretch as well (I really wonder why is was not created like that by default ... It was driving me crazy).
Note that everything was checked multiple time. I didn't found any error or non working control.
It even work if opening a old scene from 2009. But I would be really surprised if no one encounter any error ><.
As everything is working now, I choose to share it. And I need advices on a few things :
- I tried to place all new control on the place that seems the best for me, but I may be mistaking. So if you think something should be somewhere else, just tell me !
- In the same way, I tried to "auto Grey" controls that are not compatible or mandatory, but I may have forgotten some or maybe some control shouldn't be greyed.
- I didn't do anything for importons, irradiance particle, photon and all those strange indirect option that I never ever used in vfx production. But if you have any request I would be glad to add it if possible.
(note that I didn't took any line of any script I found anywhere. I didn't even tested (nor downloaded) any script to manage string options.)
To use those modified mel file, the simpler way is to put all of them in your folder maya/2012-x64/prefs/scripts. They will override standard mel and you don't change anything to your maya installation. Just delete the files and maya is back to normal (note that a scene saved will keep all string options. If you enable Iray, save the scene, delete all modified mel and reopen the scene, iray will still be enable. All string options are saved within the file. So you will have to disable it by hand).
I'm used to place all "override" mel in this script and all custom script in maya/2012-x64/scripts, so I don't mix them as they are not the same thing at all. But you could do whatever you prefer.
There it is ! Hope you like it !
PS : I'm using maya 2012, but since it's only a mel modificaiton, it should work for any version. The script do not remove any mandatory string option so it can't make your render setting disapear. And like it is explained in mentalRay documentation : "Values of a wrong type are ignored. Also, misspelled or unknown options are silently ignored by mental ray."
BUT ! Be aware thare from now if you use the mel file provided, ALL string options added are now MANDATORY ! If another script delete any string option, you will not be able to open the render setting anymore ! So if you need to use another script to do something that my modificaiton is not doing, do it carefully !
PS2 : It's only a UI modification, if you don't have the requested .dll file to enable Iray, checking "enable iray rendering" won't do anything.