Thursday, September 15, 2011

Renderview fix

Copy and paste and run this in the script editor
THis is a fix for the RenderView  error
//Error: setParent: Object 'renderView' not found
in Maya 2012


$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" ) {
deleteUI renderWindowPanel1;
$renderPanel = `scriptedPanel -type "renderWindowPanel" -unParent renderView`;
scriptedPanel -e -label `interToUI $renderPanel` $renderPanel;
}
}
}

No comments:

Post a Comment