PDA

View Full Version : How can I enable mip shaders at work?


Dangertaz
05-16-2009, 08:36 PM
The company I work for has the Mentalraycustomclass.mel write protected, making it impossible for me to comment out/delete the lines near the bottom thus enabling the mental ray production shaders (mip_matteshadow, rayswitch etc).

I can type in createNode mip_whatever to create them one by one every scene but then they only appear in my work area and if I clear the work area or close and reopen the file they're missing. It would be great just have them unlocked forever. Also, without the ability to add a line to the mel script I don't know of a way to assign mip_matteshadow to a surface, by default it only has the graph capibility.


I was able to edit the mel script at home with some fumbling and now it works perfectly, is there a way to save the nodes and open them at work?

Sorry if this is a silly question, I'm really new to mental ray and maya in general.


Any help would be MUCH appreciated!!!

djx
05-18-2009, 03:05 AM
If you are allowed to add mel scripts to your local scripts folder, then simply put your edited copy in there. It will take precedence over the global version.

-- David

Dangertaz
05-18-2009, 04:13 AM
I made a folder within scripts/others (should it be outside of others?) simply called "custom" or "mip" (can't remember at the moment) but when I relaunched maya the shaders still weren't there and when I created mip_matteshadow manually it was still incabable of being applied to a surface.

I edited the mel script on maya2009 and at work we use maya2008...could that be an issue?


Thanks for your reply!

Dangertaz
05-18-2009, 01:12 PM
Sorry, by "local" I thought you meant C:/autodesk/maya/scripts, when in fact you meant the "my documents" path. Then I had a wierd syntax error which was strange because it was simply a copy of a mel that worked perfectly well with 2009. A little monkeying and it's fine now, thanks!!

lazzhar
05-19-2009, 01:46 PM
I thought typing "optionVar -intValue "MIP_SHD_EXPOSE" 1" should show them up for good?

Dangertaz
05-19-2009, 05:05 PM
I left out the outer most quotation marks:

optionVar -intValue "MIP_SHD_EXPOSE" 1

and while it didn't give me a syntax error, it also didn't unlock the shaders, even when I relaunched maya.....

Should I do anything else?

On this same topic, when I did have them unlocked by altering the CustomNodeClass.mel it turned my hypershade swatches into nasty looking grey icons that won't update as I adjust values. Also, in my scene window anything with a texture won't shade anymore, it's turned green when I hit "6" and some of my old scenes won't render at all anymore (objects are grey against a white background), the new ones are fine, however.

lazzhar
05-19-2009, 05:22 PM
That's a total mess you got over there.
If you can afford, remove everything related to maya setup then make a new fresh install. That would save you a lot of hassle troubleshooting.

achoury
05-19-2009, 05:54 PM
I left out the outer most quotation marks:

optionVar -intValue "MIP_SHD_EXPOSE" 1

and while it didn't give me a syntax error, it also didn't unlock the shaders, even when I relaunched maya.....

Should I do anything else?

On this same topic, when I did have them unlocked by altering the CustomNodeClass.mel it turned my hypershade swatches into nasty looking grey icons that won't update as I adjust values. Also, in my scene window anything with a texture won't shade anymore, it's turned green when I hit "6" and some of my old scenes won't render at all anymore (objects are grey against a white background), the new ones are fine, however.

Hi
Just edit the "mentalrayCustomNodeClass.mel", by default it look like this
search in X:\Autodesk\Maya2009\scripts\others

// Internal MentalRay Nodes. Not meant to be used with Maya.
int $enableMIPShaders = (`optionVar -query "MIP_SHD_EXPOSE"`== 1);

replace the value 1 by 0 like this one and save it, that's all.

// Internal MentalRay Nodes. Not meant to be used with Maya.
int $enableMIPShaders = (`optionVar -query "MIP_SHD_EXPOSE"`== 0);

/rachid

CGTalk Moderation
05-19-2009, 05: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.