Python code solves Renderview window not found problem

Source: Internet
Author: User
from Source

Error:setParent:Object ' Renderview ' not found
This is a common problem in the work, in the past when the effect of 10% of the probability will come across, many occur in the other group to open the transfer of the Maya scene file;
You can use the following code when you are not able to solve it either from the File menu open or directly into Maya;

Process

It was a Mel, and I rewrote her in Python, and it became Python code ~ python is likely to replace Mel as a development trend.

Import Maya.cmds as Mcexists = 0getPan = Mc.getpanel (ScriptType = ' Renderwindowpanel ') for item in Getpan:  if item = = '     Renderview ':    print ' Renderview exists.\n '    exists = 1if exists = = 0: For  item in Getpan:    print item + ' \ n ' If item = = ' RenderWindowPanel1 ':      mc.deleteui (renderWindowPanel1)      Renderpanel = mc.scriptpanel (type = ' Rende Rwindowpanel ', unparent = Renderview)      Mc.scriptedpanel (ex = 1, L = "Renderpanel", rp = ' Renderpanel ')

Copy the code to Maya's script Editor, and press Ctrl+enter to execute;

Some people use foreground rendering plug-ins to solve this problem, in fact, the function of the foreground rendering plug-in is to solve the "only one frame rendering" problem.

Extended

This code can also be added to Maya's tool shelves in the following steps:

In some companies, they take the special effects as the final part of the CG process (in fact, the special effects are established after modeling, you can begin to synchronize the production), after the model, animation, lighting, rendering open over the project files, handed to the special effects group hands will be filled with a variety of redundant nodes, and many people do not clean the scene habits This can easily lead to various problems with the file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.