[vtk-developers] Python wrapping - Constants

David Gobbi david.gobbi at gmail.com
Fri Sep 23 15:39:48 EDT 2011


Try using an enum to define your constants, if they are ints.
Otherwise you would have to edit vtkParse.l and change the
code where it looks for "#define VTK_" to make it more general.

 - David


On Fri, Sep 23, 2011 at 12:00 PM, Jean-Christophe Fillion-Robin
<jchris.fillionr at kitware.com> wrote:
> Folks,
>
> Doing something similar to what is described below, constants (#define
> VTK_FOO 2) can be wrapped.
> This is great.
>
>
> //---------------
> [...]
> set(KIT_WRAP_HEADERS ${CMAKE_BINARY_DIR}/vtkMyProjectConfigure.h)
> set_source_files_properties(${KIT_WRAP_HEADERS} PROPERTIES WRAP_HEADER 1)
> [...]
> VTK_WRAP_PYTHON3(vtkMyProjectPython KIT_PYTHON_SRCS "${KIT_WRAP_HEADERS}")
> [...]
> //---------------
>
> Nevertheless, It seems only constant starting with "VTK_" are wrapped.
>
> How could I have constant of the form "MyProject_*" also wrapped ?
>
> The version of VTK I am using is: f5124d5c57e
>
> Thanks
> Jc
> --
> +1 919 869 8849



More information about the vtk-developers mailing list