Skip to content
Drawing OpenGL in Maya was never easier.
Branch: master
Clone or download
Latest commit 2215090 Sep 6, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs update docs Sep 3, 2016
.gitignore python packaging (minimal) Jun 18, 2016 Shorten color per vertex test Sep 3, 2016


mscreen is a convenient library allowing to easily draw openGL on Maya's viewport.

The goal is to offer TDs/TAs an easy way to draw basic GL primitives as visual feedback during debuging and/or in non-critical tools (the library is implemented in python, do not expect high performance).


Here's a quick demo of the main features:

import random
import mscreen

# let's draw a square
POINTS = ((2.0, 0.0, 2.0), (2.0, 0.0, -2.0), (-2.0, 0.0, -2.0),
          (-2.0, 0.0, 2.0), (2.0, 0.0, 2.0))
square = mscreen.drawCurve(POINTS, color=mscreen.COLOR_GRAY)

# we can move/rotate/scale it around
square.move(random.randint(-10, 10), random.randint(0, 10), random.randint(-10, 10))
square.rotate(random.random()*180, random.random()*180, random.random()*180)

# mscreen primitives have a full transform (om2)
# let's draw it too!
xfo = mscreen.drawTransform(square.transform)

# let's draw a point on each corner
for p in square.points:
    mscreen.drawPoint(p, color=mscreen.COLOR_LIGHTGRAY, size=4)

# refresh the viewport, this is done explicitly to not slow down batch drawing

# What about removing stuff?
mscreen.erase(xfo)  # it can be done selectively

mscreen.clear()  # or just clear the entire screen

Please check the tests for more examples.



mscreen is licensed under MIT, use at your own risk.


  • Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
  • Fork the mscreen repository on Github to start making your changes (make sure to isolate your changes in a local branch).
  • Write a test which shows that the bug was fixed or that the feature works as expected.
  • Send a pull request and bug me until it gets merged and published. :)
You can’t perform that action at this time.