[Maya-Python] Re: X-Ray OpenGL shapes in Maya API

2014-01-23 Thread Dilen Shah
Also found another way of doing this. glFT.glDisable( OpenMayaRender.MGL_DEPTH_TEST ) ... ... your code and your opengl shape glFT.glEnable( OpenMayaRender.MGL_DEPTH_TEST ) So two ways of doing this, this one makes to stop it after drawing, so might be better but i am nt sure. D. -- You rece

[Maya-Python] Re: X-Ray OpenGL shapes in Maya API

2014-01-21 Thread Dilen Shah
you are the man! it worked had to do some changes here and there but got it working. thnx! On Monday, January 20, 2014 7:04:48 PM UTC+1, Jack Straw wrote: > > "The naming convention used in this file is to take the regular GL* > definitions and add a "M" prefix." - Maya Python API > Docs

[Maya-Python] Re: X-Ray OpenGL shapes in Maya API

2014-01-20 Thread Jack Straw
"The naming convention used in this file is to take the regular GL* definitions and add a "M" prefix." - Maya Python API Docs

[Maya-Python] Re: X-Ray OpenGL shapes in Maya API

2014-01-20 Thread Dilen Shah
I am calling them this is my test code: import maya.OpenMayaRender as OpenMayaRender view.beginGL() # Pushed current state glFT.glPushAttrib(OpenMayaRender.MGL_CURRENT_BIT) # Enabled Blend mode (to enable transparency) glFT.glEnable(OpenMayaRender.MGL_BLEND) glFT.glClear(OpenMayaRender.GL_DEPTH_

[Maya-Python] Re: X-Ray OpenGL shapes in Maya API

2014-01-20 Thread Jack Straw
You need to call them from the OpenGL function table. Here is an example; http://www.fevrierdorian.com/blog/post/2010/02/12/Creating-custom-locator-with-Maya-s-Python-API On Monday, 20 January 2014 13:05:23 UTC, Dilen Shah wrote: > > > Hey Jack, > > I am trying to use that but in python as I am

[Maya-Python] Re: X-Ray OpenGL shapes in Maya API

2014-01-20 Thread Dilen Shah
Hey Jack, I am trying to use that but in python as I am using the OpenMayaRender module for it but glClear(GL_DEPTH_BUFFER_BIT) isnt in the attirbutes of it. Do you know which module is it from. D. -- You received this message because you are subscribed to the Google Groups "Python Programm

[Maya-Python] Re: X-Ray OpenGL shapes in Maya API

2014-01-20 Thread Dilen Shah
will try it out and let you know if i was successful. D. On Friday, January 17, 2014 1:35:17 PM UTC+1, Jack Straw wrote: > > As it is a full OpenGL viewport you can just use standard OpenGL methods > for rendering on top. From a quick google it looks like > glClear(GL_DEPTH_BUFFER_BIT) is the b

[Maya-Python] Re: X-Ray OpenGL shapes in Maya API

2014-01-20 Thread Dilen Shah
will try it out and let you know if i was successful. D. On Monday, January 20, 2014 4:25:04 AM UTC+1, Janos Hunyadi wrote: > > You can even try glPolygonOffset. Not sure if it works inside maya, but in > OpenGL that's the way to do it. > > On Friday, January 17, 2014 12:08:42 AM UTC-8, Dilen Sh

[Maya-Python] Re: X-Ray OpenGL shapes in Maya API

2014-01-19 Thread Janos Hunyadi
You can even try glPolygonOffset. Not sure if it works inside maya, but in OpenGL that's the way to do it. On Friday, January 17, 2014 12:08:42 AM UTC-8, Dilen Shah wrote: > > Hey guy, > > I am creating a MPxLocatorNode and need it to be seen on top of all object > in any viewport at all time. >

[Maya-Python] Re: X-Ray OpenGL shapes in Maya API

2014-01-17 Thread Jack Straw
As it is a full OpenGL viewport you can just use standard OpenGL methods for rendering on top. From a quick google it looks like glClear(GL_DEPTH_BUFFER_BIT) is the best option. I have done this before but I cannot remember the exact command I used that time. Jack On Friday, 17 January 2014 08