[vtk-developers] VTK and python and MTimes

Miller, James V (CRD) millerjv at crd.ge.com
Tue Dec 18 08:46:37 EST 2001

I have run across a couple of problems with the python bindings to VTK.
First, as currently configured, you must turn on Tcl wrapping in order for Python wrapping to work.
This is because the Tcl/Tk header files must be accessable to build the Python versions of the Tk
widgets (vtkTkRenderWidget, vtkTkImageWidget, etc).
I copied a section of the CMakeLists.txt file in Rendering from the VTK_WRAP_TCL section to the
VTK_WRAP_PYTHON section.  This works but it is rather ugly in that the same lines of code must be
exist in two places.  I essentially copied lines 225-285 to line 355 of Rendering/CMakeLists.txt
Second, I had VTK built with static libraries.  The python build created DLLs for the python
bindings.  This pretty much works. However, my application was behaving a little strange.  I tracked
it down to a problem where objects from Common had disjoint MTimes from objects in Rendering.  For
instance, an object from Common might have a MTime of 300 and an object from Rendering might have a
MTime of 500.  If I call Modified() on the object from Common, its MTime becomes 301 when it should
be something greater than 500!!!
Now, I don't know whether this a problem because VTK is built static and the python libs are dynamic
or whether it is a general problem with static builds (and any or no bindings).  I did a clean build
and setup the build as shared and the MTime problem goes away.  If I can find a static build of VTK
on another machine, I'll try to duplicate the problem without using python.

Jim Miller 
Visualization & Computer Vision
GE Corporate Research & Development
Bldg. KW, Room C218B
P.O. Box 8, Schenectady NY 12301

millerjv at crd.ge.com < mailto:millerjv at crd.ge.com <mailto:millerjv at crd.ge.com> >
(518) 387-4005, Dial Comm: 8*833-4005, 
Cell: (518) 505-7065, Fax: (518) 387-6981 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20011218/dda9e4a3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Miller, James V (CRD).vcf
Type: application/octet-stream
Size: 392 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20011218/dda9e4a3/attachment-0001.obj>

More information about the vtk-developers mailing list