Viewport 2 processing takes long time

posted in: Blog | 0

Viewport 2 processing takes long time


Viewport 2 processing is taking to much time to finish, maya stops responding for a long time

Since the introduction of Viewport 2.0 in Maya 2014 you may have noticed that from time to time maya bugs down and the only information you see in the command shell is „Viewport 2.0 processing“. This happens when working with difficult scenes, when importing, loading larger scenes or using even the basic functions such as Extrude on complex geometries. Depending from the function its trying to process, this processing in my case can last in average 10-15 minutes, worst case 30 min. and if you have to repeat a function a couple of times a day in becomes time expensive.

 

What you can do to prevent this is disabling Viewport 2 during processing using these couple of lines of script

//turn off viewport before starting a function
paneLayout -e -manage false $gMainPane;
//turn back on vieport after the function has finished
paneLayout -e -manage true $gMainPane

 

You can tweak your normal scripts by encapsulating them with these scripts. For example, I often work with geometries that are complex to the point that extrude edge can take in average 10 min up to 20 min. So I tweaked existed extrude edge function

//turn off viewport before starting a function
paneLayout -e -manage false $gMainPane;
//start function
polyExtrudeEdge
-constructionHistory 1 -keepFacesTogether 1 -pvx 0 -pvy 0 -pvz 0 -divisions 1 -twist 0 -taper 1 -offset 0 -thickness 0;
//end of function
//turn back on vieport after the function has finished
paneLayout -e -manage true $gMainPane;

 

If you want to use this is script within a procedure you have to declare $gMainPane as a global string variable.

global string $gMainPane;
proc example()
{
paneLayout -e -manage false $gMainPane;
//...your code...
paneLayout -e -manage true $gMainPane;
}

If you are not sure if you can benefit from this method try running your function in Maya default viewport. If it takes less time to finish try implementing this script into your workflow.

 

If this issues appers only during opening scenes, you can prevent this problem by changing your rendered of viewport to maya softwere before saving. This can also help then opening bigger scenes, less possibilty to crash maya when opening scene.

Share with friends
  •  
  •  
  •  
  •  
  •  
  •  

Leave a Reply