mtherrell
unread,Feb 3, 2011, 11:16:41 PM2/3/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to python_inside_maya
i would like to have a QGraphicsView serve as a HUD over an assumedly
openGL Maya modelPanel..
i am able to get my "overLay" QGraphicsView to be translucent when its
over normal maya QT interface elements. but when it overlaps the
openGL modelPanel, one cannot see the 3D view through the
QGraphicsview background.
(i have a great image demonstrating this.. no way to attach images
here?)
how i'm doig it so far:
basically i just setColor in the palette of gView.viewPort to
(QPalette.Base, Qt.transparent),
then, gView.setAttribute(Qt.WA_TranslucentBackground,True)
make sure the graphicsView is the central widget of a window.. and
pow!
..the background of the QGraphicsView is transparent to all maya
interface (save openGL modelPanel)
..but any QGrpahicsItems in the View are opaque, and have all the
wonderful utility of the QGraphics framework.
big problem though.... whenever this QGraphicsView "overlay" is over a
modelPanel, partially or in whole, the overlap with the panel appears
black and the graphicsItems leave artifacts (streaks) when you move
them around over this area. the view grid or any geometry are not
there, just blackness.
the Maya modelPanel is not a QGLWidget, (as far as i can tell).. so it
is not a simple matter of using QGL classes and functions to composite
the two together.
one approach might be for me to find a way to openGL render the Maya
scene graph myself in a QGL widget in essence, creating my own Qt
modelPanel. but that sounds like a long hard road because i would have
to mimic all of maya's user interactions with the3D elements depicted
in the scene.
another approach might be for me to somehow grab snapshots of the maya
gl render output as they happen and draw them as the QGraphicsScene
background. but that sounds like it could be slow, and i have no idea
yet how to intercept the output of a modelPanel viewport in such a way
as to get streaming pixamaps into the background of a graphics scene.
what i would love is if there is a way to have my "overlay"
QgraphicsScene background demonstrate transparency over this maya
modelPanel in a totally Maya agnostic way.
much the same way that "window.setWindowOpacity(0.2)" does, but with
the ability to have opaque items in the graphicsScene