sorry, misinterpreted what was going on in the video.
he is using OpenGL to draw the text in his custom plugin.
Look into the M3DView documentation in the API docs. you have to do the
conversion form C++ to python coding.
and i am sure if you dig through some of the sample scripted plugins in the
devkit in your maya install you will find some examples.

http://forums.cgsociety.org/archive/index.php/t-136112.html
here is a link to a simple example of getting some data drawing to the
viewport, the given code is only the draw part of a custom plugin node.

but if all you need is a simple text display for an object i would suggest
using the annotation node route.

On Mon, Aug 1, 2011 at 9:24 AM, damon shelton <[email protected]>wrote:

> that is just using an expression to set the text of an annotation node - no
> python/python API needed
>
> select an object and choose create>annotation...
> your expression should get the value you want to display and then write out
> the text attribute of the annotation node(don't forget to use the -type
> "string" on the setAttr call)
>
>
> On Mon, Aug 1, 2011 at 5:41 AM, andrearastelli <
> [email protected]> wrote:
>
>> Hi everyone,
>> I need some help with python api.
>>
>> how this guy can write text into the viewport?
>> Where i can find some help (or a bounch of code?)
>>
>> http://vimeo.com/24052855
>>
>> --
>> 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