PantoGraph is a Blender plug-in that provides Blender with a new rendering functionality called vector rendering. Unlike the builtin rendering engine in Blender that produces raster graphics, PantoGraph's vector rendering engine produces vector graphics. PantoGraph allows you to render 3D scenes in a vector graphics format such as SVG and PDF, as well as to generate vector graphics animations in the Shockwave Flash (SWF) format.
The purpose of this document is to provide information on how to install PantoGraph (version 0.4) on Windows. PantoGraph requires several external software packages in addition to working installations of Blender and its extension language Python, so that you may find it difficult to get PantoGraph running on Windows. This document presents a complete list of steps to install all software packages to be needed. It is also intended to solve common problems in installing PantoGraph on Windows.
This document assumes that you have the following versions of Blender and Python installed on Microsoft Windows XP (32 bits). If you don't have Blender and/or Python on your Windows system, follow the instructions below:
Download and run blender-2.45-windows.exe from http://www.blender.org/download/get-blender/.
Download and run python-2.5.2.msi from http://www.python.org/download/.
Here is a list of external software packages that are required to run PantoGraph.
To get these software packages installed on your Windows system, go along with the following step-by-step instructions:
The GTK+ runtime is in short a set of dynamic-link libraries (DLL files) for building graphical user interface (GUI). There are several ways for installing the GTK+ runtime, and the recommended way in this document is to install GIMP for Windows, which comes with all the GUI libraries you need to run PantoGraph on Windows. To install GIMP for Windows, just download and run gimp-2.4.5-i686-setup.exe from http://gimp-win.sourceforge.net/stable.html.
These are Python bindings that allow the GTK+, GObject and Cairo libraries in the GTK+ runtime to be called from Python. It is important to match the versions of the libraries and corresponding Python bindings. This can be achieved by using the following Windows installers:
See also 21.1 How do I get PyGTK running on MS Windows? in the PyGTK FAQ for more information on the GTK+ runtime and Python bindings on Windows.
Polygon is a Python module for manipulating two-dimensional polygons in Python. There seems no official Windows installer of the software package, so here is Polygon-1.17.win32-py2.5.exe which is an unofficial Windows installer built by the author of this document.
Ming is a library for generating movies in the Shockwave Flash (SWF) format. The library comes with its own Python binding, which is needed to enable the animation generator in PantoGraph. Here is mingc-0.0.3a.win32-py2.5.exe, an unofficial Windows installer also built by the author of this document.
An important step you need to take is to add the GTK+ runtime directory to the PATH environment variable. If you have installed GIMP for Windows as described above, the GTK+ runtime directory is C:\Program Files\GIMP-2.0\bin. Adding this directory to the PATH environment variable can be done as follows:
Setting the PATH environment variable is important because unless setting it correctly, the DLL files in the GTK+ runtime will not be available to Blender and Python, which causes various runtime errors. See typical runtime errors in the Trouble Shooting section below.
PantoGraph (version 0.4) can be installed as follows:
Download pantograph_0.4.zip from http://severnclaystudio.wordpress.com/bluebeard/pantograph-download/ and extract the following files from the ZIP file.
Copy all of these files to C:\Program Files\Blender Foundation\Blender\.blender\scripts.
Edit the line #111 in pantographLib.py as follows:
Now you can run PantoGraph as follows: (1) start Blender; (2) open pantograph.py by selecting File - Open in the Text Editor window; and (3) run it by selecting File - Run Python Script (or pressing Alt-P) in the Text Editor window.
Typical problems in running PantoGraph on Windows are runtime errors related to dynamic link libraries (DLL files). Some frequently observed errors and their solutions are shown below.
If you get an "Unable to Locate Component" error as illustrated above, first make sure that you have a working GTK+ runtime, and then check if the PATH environment variable is set correctly. The DLL file libcairo-2.dll in the above example is part of the GTK+ runtime, so that blender.exe should be able to locate it as long as you have installed a working GTK+ runtime and have correctly configured the PATH environment variable. Other components of the GTK+ runtime that may appear in the error message include libgtk-win32-2.0-0.dll, libglib-2.0-0.dll, and libgobject-2.0-0.dll. You can make sure that you have a working GTK+ runtime by just starting GIMP for Windows (Note: The first run may take for a while). Checking if the PATH environment variable is correctly configured can be done as follows: Open the Command Prompt from Start - Programs - Accessories (or Select Start - Run and type "cmd" without quotes) and enter "gimp-2.4". If everything is okay, GIMP for Windows will start up.
This is probably the most typical runtime error concerning PantoGraph on Windows. The cause of this error is that you have multiple instances of the iconv.dll file on your Windows system. For example, Blender has a version of the DLL file and the GTK+ runtime has another. A practical solution of this error is to enable only one of them by renaming the others to a different file name (such as iconv.dll.bak). Some trials and errors will suffice to solve the problem.
This error indicates either (i) there is only one instance of the libglib-2.0-0.dll file, which does not contain the required procedure g_timeout_add_seconds_full, or (ii) there are multiple instances of the DLL file and a particular instance without the required procedure in it happens to be used. In both cases, the GTK+ runtime being used is somewhat older than the one that PantoGraph requires, so you can solve the problem by installing the newer GTK+ runtime and configuring the PATH environment variable (as described above) so that the newer one will be used. You may also need to remove the directories of the older GTK+ runtimes (if any) from the PATH environment variable. (Note that these changes to your Windows system may cause other GTK+ applications run into trouble concerning version mismatch. It is difficult in general to have multiple GTK+ runtimes installed on the same Windows system and make use of a different runtime depending on applications.)
This document and supplementary Windows installers are provided in the hope that they are useful, but the author makes no warranty regarding accuracy, completeness, or reliability. Please use the information and the installers at your own risk. Comments and suggestions on this document are very welcome.
Tamito KAJIYAMA <rd6t-kjym at asahi-net dot or dot jp>