Fix for Maya 2012 Error: setParent: object ‘renderView’ not found

来源:互联网 发布:java邮箱正则表达式 编辑:程序博客网 时间:2024/05/02 01:57
Autodesk Maya 2012 continues to "please" it's users with errors and bugs, while some of them possibly can become problematic and annoying. For example, one of the common errors in Maya 2012 - suddenly disappeared RenderView window content and menu buttons, when instead of rendering results user can see blank gray background. Fortunatly this can be easily fixed.

During the call for RenderView window in case of this error Maya will produce such error message:

Error: setParent: object ‘renderView’ not found

Cause of this error lies in fact that Maya sometimes for some reason stores incorrect data of it's window positions in one of the settings files, which are stored in user's Documents folder. So, to fix this issue user can just clear Maya prefrences by deleting corresponding files, or take another, better path, because need to delete Prefrences each time when this error appears is no good at all.

For this open Script Editor and paste into it following code:

 $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;                }        } }

Next to save our script on the Shelf for quick future access, in Script Editor go to File--> Save Script to Shelf and enter desired shelf button name, for example, something like RVFix. Keep in mind that button will be created in active Shelf tab, so prior to saving I can recommend to select Custom shelf tab and store your script there.

Now whenever you encounter this error you can simply click on shelf button and get your RenderView on where it supposed to be.

转载自  http://3dg.me/3d-graphics/maya/fix-for-maya-2012-error-setparent-object-renderview-not-found

原创粉丝点击