How to get PantoGraph running on Windows

Introduction

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.

Installing Blender and Python

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:

  1. Blender 2.45

    Download and run blender-2.45-windows.exe from http://www.blender.org/download/get-blender/.

  2. Python 2.5.2

    Download and run python-2.5.2.msi from http://www.python.org/download/.

Installing PantoGraph's requisites

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:

  1. The GTK+ runtime

    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.

  2. PyGTK, PyGObject and PyCairo

    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.

  3. Polygon

    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.

  4. Ming Python binding

    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.

Setting the PATH environment variable

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:

  1. Open the System Properties dialog from Control Panel - Performance and Maintenance - System (or by pressing the right button on My Computer and selecting Properties).
  2. Open the Advanced tab in the dialog and press the Environment Variables button.
  3. Find the row with the variable nam "Path" in the list of System variables, select the row, and press the Edit button.
  4. Move the cursor to the end of the Variable value (by clicking somewhere in the entry and pressing the End key), and add a semicolon ";" at the end (unless there is already a semicolon) and "C:\Program Files\GIMP-2.0\bin".

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.

Installing PantoGraph

PantoGraph (version 0.4) can be installed as follows:

  1. Download pantograph_0.4.zip from http://severnclaystudio.wordpress.com/bluebeard/pantograph-download/ and extract the following files from the ZIP file.

  2. Copy all of these files to C:\Program Files\Blender Foundation\Blender\.blender\scripts.

  3. Edit the line #111 in pantographLib.py as follows:

    Original:
    HOMEDIR = "/home/sclay/.blender/scripts/"
    Modified:
    HOMEDIR = "C:/Program Files/Blender Foundation/Blender/.blender/scripts/"

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.

Trouble Shooting

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.

Disclaimer

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>

Count.cgi