Hey David,<div><br></div><div>Can you look at the ParaView dashboard? I think some of these changes are causing build errors with client server wrapping.</div><div><br></div><div><div>/home/kitware/dashboards/paraview-build-all-debug/Utilities/VTKClientServer/Common/vtkCommandClientServer.cxx: In function ‘int vtkCommandCommand(vtkClientServerInterpreter*, vtkObjectBase*, const char*, const vtkClientServerStream&, vtkClientServerStream&)’:</div>

<div>/home/kitware/dashboards/paraview-build-all-debug/Utilities/VTKClientServer/Common/vtkCommandClientServer.cxx:14:20: error: ‘SafeDownCast’ is not a member of ‘vtkCommand’</div><br><div class="gmail_quote">On Tue, Aug 17, 2010 at 2:52 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I tried wrapping vtkCommand, and python can wrap it because it's<br>
already properly tagged as "abstract".  So it just can't be used the<br>
way that I would like.  But all the constants are there.<br>
<br>
import vtk<br>
print vtk.vtkCommand.ModifiedEvent<br>
33<br>
<font color="#888888"><br>
  David<br>
</font><div><div></div><div class="h5"><br>
<br>
On Tue, Aug 17, 2010 at 11:59 AM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
> Wrapping vtkCommand.h is difficult, but not because of the constants.<br>
> The vtkCommand class itself is internally handled in a very "special"<br>
> way by the wrappers.  So while I do want to wrap this class and its<br>
> constants, it won't happen immediately.<br>
><br>
> For some things, you can substitute a string for the constants i.e.<br>
> AddObserver("ModifiedEvent", func).  But I know that this doesn't work<br>
> for everything.<br>
><br>
>   David<br>
><br>
><br>
> On Tue, Aug 17, 2010 at 11:48 AM, Jean-Christophe Fillion-Robin<br>
> <<a href="mailto:jchris.fillionr@kitware.com">jchris.fillionr@kitware.com</a>> wrote:<br>
>> 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>
>> On Tue, Aug 17, 2010 at 1:42 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
>>><br>
>>> 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>
>>><br>
>>>  David<br>
>>><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>><br>
>>> 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<br>
>>> <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>
>><br>
>><br>
>><br>
>> --<br>
>> Phone: 1-518-836-2174<br>
>> Ext: 304<br>
>><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></div>