I've used Maya API to capture Maya View and save it as a file.
(like below)
import maya.OpenMaya as openMaya
import maya.OpenMayaUI as openMayaUI
view = openMayaUI.M3dView.active3dView()
width = view.portWidth()
height = view.portHeight()
image = openMaya.MImage()
view.readColorBuffer(image, True)
view.writeToFile("c:/capture.jpg", "jpg")
But from Maya 2014, I have a trouble with it.
In case of Viewport 2.0 with directX 11, it return a just a background of view.
I guess that the command work in openGL. Is it right?
Is there any API command or something to capture directX 11 environment?