Hello, first post here… need some help on creating a small tool.
I was trying to create a tool to playblast all the views in maya for the animators at work.
Here is what am doing so far…
import maya.cmds as cmds import maya.mel as mel viewPanels = cmds.getPanel(type="modelPanel") visiblePanels = cmds.getPanel(visiblePanels=True) renderPanels = list( set(viewPanels) & set(visiblePanels) ) for panel in renderPanels: cmds.setFocus(panel) panelName = cmds.panel(panel, q=True, label=True).split(" ") print panelName renderPath = "~/Desktop/test/playblast/%s.mov"%panelName mel.eval('playblast -format qt -filename "'+renderPath+'" -sequenceTime 0 -clearCache 1 -viewer 1 -showOrnaments 1 -offScreen -fp 4 -percent 100 -compression "jpeg" -quality 100;')
This works fine if I have a quad view… where all the views will be rendering by their actual names. Side, Front, Top and Persp.
But it fails to recognize the view name if I have two views.
If I have just perspective and side view it renders both the views properly, but the panelName is returned as Top instead of Side.
Am I missing something… please point out if there is any better way of doing it.