The joint node is not an API type, but a stock Maya node, meaning it's not
written using the Maya API, and therefor is not constrained by the
limitations of the interface exposed by the API.

If you want to draw an object in 3D you need to derive your object from a
Maya API node type that will allow you to draw: MPxLocatorNode is the best
example I can think of. There are other types that have a draw method, such
as MPxFieldNode, MPxEmitterNode, MPxSurfaceShapeUI, but if you simply want
something to have a display then MPxLocatorNode is your best bet.

-Judah


On Wed, Dec 14, 2011 at 5:28 PM, AK Eric <[email protected]> wrote:

> I'm not expert on this subject, but I tried the same thing in the past
> without any luck. My guess is you need to create an actual
> 'node' (like you said you didn't want to do) to pull this off.  I was
> recently looking at Coral, and that's an external app that does all
> sorts of custom drawing inside of Maya, but it's via a plugin.  But
> maybe bigger brains will prevail on the subject ;)
>
> On Dec 13, 4:26 pm, notanymike <[email protected]> wrote:
> >  For no particular reason, I'm trying to find out how joints,
> > ikHandles, LRA's, etc are rendered in the 3d viewport without the need
> > of shapes. I want to do the same, but for now I'm trying to just get
> > opengl to draw anything in the 3d viewport without writing my own
> > viewport, locator shape, or any plugin of any kind. Basically, I want
> > opengl to render something via the script editor (in python mode). I'm
> > guessing that it requires getting the device context ( HDC ) of the
> > viewport though pyWin32 and pyOpenGL and somehow inserting the gl draw
> > procedure into it, but how exactly is that process (safely) achieved
> > for Maya?
>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to