Mel script to fix render issues.
Here's a script I found that fixes Maya's rendering problem, at least the issue I had.
$exists=0;
for ($item in `getPanel -scriptType "renderWindowPanel"`) {
if ( $item == "renderView" ) {
print "renderView exists.\n";
$exists=1;
}
}
if ( $exists == 0 ) {
for ($item in `getPanel -scriptType "renderWindowPanel"`) {
//print ( $item + "\n");
if ( $item == "renderWindowPanel1" ) {
//delete it and rename it to something that renderman can use
print "renderWindowPanel1 detected: switching to renderView so renderman can use it...\n";
deleteUI renderWindowPanel1;
$renderPanel = `scriptedPanel -type "renderWindowPanel" -unParent renderView`;
scriptedPanel -e -label `interToUI $renderPanel` $renderPanel;
}
}
}