[vtkusers] Module auto-initialization problem
David Thompson
david.thompson at kitware.com
Wed Aug 29 13:19:06 EDT 2012
Hi all,
>> For some reason, VTK/Rendering/Matplotlib/CMakeFiles/vtkRenderingMatplotlib.cmake contains:
>> set(vtkRenderingMatplotlib_EXCLUDE_FROM_WRAPPING 1)
>> which appears to prevent client-server wrapping and thus, in turn, auto-initialization of the object factory in the application. Is there a reason for this?
>>
>>> I know David Lonie is working on this, perhaps he has already hit this issue? I can help debug the autoinit stuff if that doesn't seem to be working.
>
> I haven't gotten to try out matplotlib in paraview yet, but the reason
> matplotlib was excluded from wrapping is because no classes in it
> should be exposed in the language bindings (the mathtext classes
> should be used instead). If this is preventing the module from playing
> nicely with paraview it can be removed.
In the end, it took 2 things in order to get the object factory registered:
1. Removing EXLUDE_FROM_WRAPPING from Rendering/Matplotlib/module.cmake (so the client-server wrapping library gets built with the right compile-time define), and
2. Removing vtkMatplotlibMathTextUtilities from the list of files with the WRAP_EXCLUDE property. Without this, the client-server wrapping library would not contain any wrapped classes and that appeared to be enough to prevent the initialization from happening.
Dave, do you have any problem with these changes? Marcus, would you prefer for ParaView (and other apps) to accomplish the factory registration some other way?
Thanks,
David
More information about the vtkusers
mailing list