Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

[Python] Draw text in the UV editor

lukasz.czyzz
Participant

[Python] Draw text in the UV editor

lukasz.czyzz
Participant
Participant

I found the following example which allows to draw text in the 3D viewport in an easy way using the Python 2.0 API: https://help.autodesk.com/view/MAYAUL/2024/ENU/?guid=MAYA_API_REF_py_ref_python_2api2_2py2_ui_draw_m...

 

My question is: can the example be modified somehow such that text is drawn in the UV editor instead of the 3D viewport?

Reply
357 Views
1 Reply
Reply (1)

lukasz.czyzz
Participant
Participant

Ok, after a few weeks of searching it looks like the only option for drawing in the UV Editor is using the `MPxTexContext` class and its `drawFeedback` method. Drawables which are defined in that method are in fact drawn in the UV Editor.

 

BUT it looks like the `MPxTexContext` class is not exposed in the Python API. So it turns out I will have to move a subset of plugin functionalities to C++ and pass data from Python to C++ somehow.

 

Thank you Autodesk for not exposing something which seems to be the only option for UV Editor drawing to Python 😕