PDA

View Full Version : Turning on irradiance particles and importons via mel?


cliddell
12-24-2008, 06:23 PM
Hi-

I'm trying to figure out how to toggle on and off Irradiance Particles and Importons via mel and I've run into a brick wall. Unfortunately it's not as simple as most of the other check boxes in the Indirect Lighting tab, all of which can be done with setAttr. I've tried to directly edit the check boxes as well without any luck. If anyone could point me to the solution I'd be eternally grateful.

Regards-

greatPumpkin
12-30-2008, 07:43 AM
try creating a dead simple example file with as few particles as possible, save it as maya ascii, and then switch the values and resave as a second file, compare the files and you should be able to figure out what to pass setAttr to get what you want-

you can also save th ascii file with long name attributes (although I tried that today and it didn't work?) at any rate you can run listAttr node.attributeName and it will give you the long name.

The long names should hopefully make enough sense that you can figure out which attribute you want.

cliddell
01-06-2009, 02:57 PM
try creating a dead simple example file with as few particles as possible, save it as maya ascii, and then switch the values and resave as a second file, compare the files and you should be able to figure out what to pass setAttr to get what you want-

you can also save th ascii file with long name attributes (although I tried that today and it didn't work?) at any rate you can run listAttr node.attributeName and it will give you the long name.

The long names should hopefully make enough sense that you can figure out which attribute you want.

Thanks greatPumpkin. That did the trick. They're all listed in the miDefaultOptions.stringOptions array, which I should have figured out easily. For anyone else who has the same dilemma here's the code to do it, (with low quality settings.)-

setAttr -type "string" miDefaultOptions.stringOptions[4].value "1.5"; //Importon Density
setAttr -type "string" miDefaultOptions.stringOptions[5].value "0.05"; //Importon merge distance
setAttr -type "string" miDefaultOptions.stringOptions[6].value "2"; //Importon Max Depth
setAttr -type "string" miDefaultOptions.stringOptions[15].value "128"; //IR rays
setAttr -type "string" miDefaultOptions.stringOptions[18].value "1"; //IR indirect pass
setAttr -type "string" miDefaultOptions.stringOptions[17].value "64"; //IR interpoints
setAttr -type "string" miDefaultOptions.stringOptions[21].value "200"; //IR env. rays
setAttr -type "string" miDefaultOptions.stringOptions[20].value "true"; //IR env rays turned on
setAttr -type "string" miDefaultOptions.stringOptions[3].value "true"; //Importons turned on
setAttr -type "string" miDefaultOptions.stringOptions[14].value "true"; //IR turned on

CGTalk Moderation
01-06-2009, 02:57 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.