Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Capture Maya view in Viewport 2.0 DirectX 11?

1 REPLY 1
Reply
Message 1 of 2
icapathos
1097 Views, 1 Reply

Capture Maya view in Viewport 2.0 DirectX 11?

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?

 

1 REPLY 1
Message 2 of 2
RustyNail_Ju
in reply to: icapathos

I think there is a bug in your code .

the last line: image.writeToFile(pararms..) instead of view.writeToFile()

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report