So i added a prerender callback to maya using this
cbid = OpenMayaUI.MUiMessage.add3dViewPreRenderMsgCallback ("modelPanel1", 
ViewportCallback, self)

and inside i am trying to draw some points. 
it works fine except for one thing
i obtain my matrices using this:
        projection = OpenMaya.MMatrix()
        modelView = OpenMaya.MMatrix()
        view.projectionMatrix(projection)
        view.modelViewMatrix(modelView)
and i do indeed get the matrices that i want but the problem occurs when i 
rotate my viewport. the modelview matrix doesn't seem to get updated properly.
if i try to move an object in the scene, the matrix receives the update

what's going on here? is there a way to force the update? or should i be 
querying the matrices from somewhere else?
i tried to obtain them directly from opengl and i just received an identity 
matrix so i'm guessing that's no good either.

any info would be appreciated
cheers

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to