I've made a Jython library named
JyP5, that provides easy interface to Processing, along with some additional features like on-the-run code reloading.
In other words, it allows writing of Processing sketches in Jython - implementation of Python in Java.
Unike Jonathan Feinberg's
processing.py, which uses modified Jython interpreter,
JyP5 is just a Python library. This makes the project simpler, smaller, and more hackable. For exammple, the following things become possible:
changing Processing or Jython version just by referencing different library/launching another interpreter
IDE support - autocomplete, debug (via remote debugger), etc.
code reloading
REPL
Apart from providing interface to Processing, JyP5 has several additional features:
What I'm trying to do is to be able to get and set current transform matrix.
Obvious way to do this would be using getMatrix() and setMatrix() methods, but they do not work with all renderers.
In Processing 2.04 they only work with JAVA2D renderer; P2D says "setMatrix is not available with this renderer" and does nothing; P3D doesn't print error but nothing gets drawn. In 1.5.1 all renderers work except P2D.
In Processing 2, it's also possible to make it work for P2D and P3D by accessing modelview matrix directly. Can it be considered reliable, or modelview is an implementation detail? Should I also copy/restore modelviewInv every time? And is that setMatrix()/getMatrix() behaviour bug or feature?