[vtkusers] Module auto-initialization problem

David Lonie david.lonie at kitware.com
Wed Aug 29 13:32:07 EDT 2012


On Wed, Aug 29, 2012 at 1:19 PM, David Thompson
<david.thompson at kitware.com> wrote:
> 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?

So long as VTK still builds with all language bindings turned on and
it doesn't cause any test failures, this is fine with me.

Dave



More information about the vtkusers mailing list