Hi David, <br><br>That's awesome :) <br><br>Question:<br>  If we add vtkCommand.h to Kit_WRAP_HEADERS, would the eventid be wrapped ? <br><br>By eventid, i mean the enum regrouping ModifedEvent, ... <br><br>Thks<br>Jc<br>

<br><div class="gmail_quote">On Tue, Aug 17, 2010 at 1:42 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

For wrapping VTK constants, I've created an optional variable for the<br>
kits, e.g. in Common/CMakeLists.txt:<br>
<br>
SET(Kit_WRAP_HEADERS<br>
  vtkSystemIncludes.h<br>
  vtkType.h<br>
  ${VTK_BINARY_DIR}/vtkConfigure.h<br>
  )<br>
<br>
This tells the python wrappers to wrap these headers<br>
(Filtering/vtkCellType.h is also wrapped).  Since the constants are<br>
wrapped directly into the kit python modules, vtkConstants.py is<br>
obsolete.<br>
<font color="#888888"><br>
  David<br>
</font><div><div></div><div class="h5"><br>
<br>
On Mon, Aug 16, 2010 at 11:45 AM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
> Hi All,<br>
><br>
> I'm looking for the best way to modify the VTK cmake scripts so that I<br>
> can automatically wrap constants like VTK_POLY_DATA.  Right now, some<br>
> of these constants are hard-coded in e.g. vtkConstants.py but of the<br>
> wrapper's "hard-coded" copies of the constants are never up to date.<br>
> The only thing that is needed to python-wrap these constants is to<br>
> pass the header files vtkConfigure.h, vtkType.h, etc. to<br>
> vtkWrapPython. One way to do this is to add these headers to the<br>
> source list:<br>
><br>
> Set(Kit_SRCS vtkType.h ...)<br>
> SET_SOURCE_FILES_PROPERTIES(vtkType.h HEADER_FILE_ONLY)<br>
><br>
> However, I'm reluctant do to this because no other VTK header files<br>
> are handled this way.  The alternative is to make a separate list for<br>
> header files, one that will be used by KitCommonPythonWrapBlock.cmake:<br>
><br>
> Set(Kit_HDRS vtkType.h ...)<br>
><br>
> And then in KitCommonPythonWrapBlock.cmake:<br>
> SET(FILES_TO_WRAP ${Kit_SRCS} ${Kit_HDRS})<br>
> VTK_WRAP_PYTHON3(vtk${KIT}Python KitPython_SRCS "${FILES_TO_WRAP}")<br>
><br>
> I'm leaning towards this latter method, because it seems to be the<br>
> tidier of the two approaches.<br>
><br>
>  David<br>
><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Phone: 1-518-836-2174<br>Ext: 304<br>