Draw Image new maya API, viewport 2.0

266 views
Skip to first unread message

Dilen Shah

unread,
Dec 26, 2016, 6:28:18 AM12/26/16
to Python Programming for Autodesk Maya
Hey guys,

I am trying to draw an image in viewport 2.0 but can't seem to find any information on it.

Before in M3dView ,

view = OpenMayaUI.M3dView().active3dView()
image = OpenMaya.MImage()
image.readFromFile(IMAGEPATH)
        
view.writeColorBuffer(image, x, y)

This used to work perfectly and still does in legacy viewport code, but in viewport 2.0 I can't seem to get it as this method is obselete now.

And in the autodesk reference it says: Use MHWRender::MQuadRender operation inside MHWRender::MRenderOverride instead
I can't seem to understand how I can do it using this. Please let me know how this can be solved.

Thanks in advance.

Dilen.

Yafes Sahin

unread,
Oct 3, 2017, 8:39:04 PM10/3/17
to Python Programming for Autodesk Maya
Would be nice to have a follow up on that!
Reply all
Reply to author
Forward
0 new messages