There is a 
setColorMask<http://download.autodesk.com/us/maya/2011help/API/class_m3d_view.html#663f9fa64461580686fb02ad1f98f18a>
 method, 
but I can't really figure out the usage. I can set the background color in 
my viewport to anything. I was hoping I could use that method to 
"configure" the alpha.
Has anyone used setColorMask?

On Tuesday, November 27, 2012 3:17:52 PM UTC-8, Python inside Maya wrote:
>
> 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

Reply via email to