[RFC] OpenGL dump in vector format (via gl2ps).
Closed, ArchivedPublic



I attach here a preliminary patch to dump the 3dView to a vector format
(EPS, PDF or even SVG) using gl2ps. You can see an example here:

The patch is against latest CVS, to test it you will need to install
gl2ps (http://www.geuz.org/gl2ps/) and append
LLIBS+=' gl2ps'
to your user-config.py

I asked also on bf-committers for some comments about how I implemented this
Saving to a vector format with gl2ps is supported
_only_ for the 3dView, not for any subwindow (as far as I know), so I
did put the majority of the code in source/blender/src/screendump.c
Because I'm using the "Dump Subwindow" menu entry, I'm forced to do some
checks on the spacetype to ensure that SPACE_3DVIEW is active, thus the
code is not very clean and my little knowledge of blender internals
does not help me to provide a more elegant solution. Please can you
give me an advice here?

If you think that this funcionality can be added to blender someday I
will manage to make it optional at compile time, I know that gl2ps is
not very diffused and it must not be considered a dependency, of course.

Many thanks.

Have a good time,
Antonio Ospite.