I am using the following code to screen grab a custom viewport (thanks
Nathan Horne)
#Import api modules
import maya.OpenMaya as api
import maya.OpenMayaUI as apiUI
#Grab the last active 3d viewport
view = apiUI.M3dView.active3dView()
#read the color buffer from the view, and save the MImage to disk
image = api.MImage()
view.readColorBuffer(image, True)
image.writeToFile('C:/test.png', 'png')
Is there any way to include alpha in the image? I just want the background
alpha'd out.
I don't have a lot of API experience in this area and would love any
pointer (no pun intended) I can get.
Thanks,
/Christian
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
http://groups.google.com/group/python_inside_maya/subscribe