How can I get rid of the mental ray nodes in my Maya scenes files?

Stephen.Blair
Community Manager
Community Manager

How can I get rid of the mental ray nodes in my Maya scenes files?

Stephen.Blair
Community Manager
Community Manager

I keep getting this warning when I load older scenes:

407-file-contains-mental-ray-nodes.png

In some scenes, it's enough to turn off Display > DAG Objects Only in the outliner and then delete the mental* nodes, but that doesn't work in every scene.



// Stephen Blair
// Arnold Renderer Support
0 Likes
Reply
Accepted solutions (1)
6,701 Views
6 Replies
Replies (6)

Anonymous
Not applicable
Accepted solution

This MEL script is what I've been using, don't remember the origination, but it works!

  • Download the attached file.
  • Rename it to cleanup_mayatomr.mel
  • Load into a MEL tab in the script editor.
  • Run it

cleanup-mayatomrmel.txt

0 Likes

Anonymous
Not applicable

Paste in your script editor and run, should clean out your file .. then save and voila.

0 Likes

jch
Enthusiast
Enthusiast

Sweet. Thanks for sharing this Marcel. Will try it out.

0 Likes

Armonabennett_Armonabennett
Not applicable

THANKYOU - saved my rig.

0 Likes

Anonymous
Not applicable

The MEL script to remove MentalRay residual nodes...


print("\n");

print("\n");

print("Working on:\n");



string $mrNodes[] = `ls -typ "unknown"`;



for ($each in $mrNodes){

    if (`objExists $each` && `unknownNode -q -p $each` == "Mayatomr"){

        print($each + "\n");

        delete $each;

    }

}





if (`objExists mentalrayIblShape1`){

    delete mentalrayIblShape1;

}



unknownPlugin -remove "Mayatomr";

print "\n";

print "---> Done";


0 Likes

bose_ayesha10
Community Visitor
Community Visitor

THANK YOU SO MUCH for sharing this. It really did save my work.

0 Likes