Maya API Questions about rendering.

47 views
Skip to first unread message

I73

unread,
Nov 18, 2016, 8:10:30 PM11/18/16
to Python Programming for Autodesk Maya
I am in the process of converting a lot of our tools over to C++ and I am having some trouble with rendering a scene:

M3dView view = M3dView::active3dView();

MImage fileImage;
view.readColorBuffer(fileImage, true);
fileImage.writeToFile("D:/test.jpg", "jpg");
cerr << "Rendered" << endl;

This renders the current view out exactly as seen, I checked the class members and could not see anything to render out a scene with the default render, I am looking to render as the "Default renderer" Would it be best to render out in python with these sorts of tasks?

cam = cmds.ls('perspShape')[0]
returnImage = cmds.ogsRender(camera = cam, w=1080, h=1080)

Thanks for any help or advice! 
Reply all
Reply to author
Forward
0 new messages