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

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值