[Paraview] PV4.1, Custom Dock Widget: How to automatically add a glyph3d filter after loading data ?
Utkarsh Ayachit
utkarsh.ayachit at kitware.com
Wed Sep 17 10:19:00 EDT 2014
> All of the above work, except the ScaleFactor setter. The scale factor is
> odd anyway: in the GUI a value of 1.8 appears by default (even though
> according to the doc it should be 1.0) . Any clue ?
Certain properties update their default values based on runtime data
values. This is done by what ParaView calls Domains. ScaleFactor is
one such property. To force the ScaleFactor to 1, do the change after
the "PostInialize" call.
> Last question: How do I gain access to the GlyphSource(=SphereSource) object
> in order to use the .SetRadius(1.0) function on it ?
> It is not clear to me whether it needs to be accessed through a
> vtkSMPropertyHelper or through a proxy ?
vtkSMPropertyHelper(glyph, "Source").Set(getSphereSource(glyph));
vtkSMProxy* sphere = vtkSMPropertyHelper(glyph, "Source").GetAsProxy();
vtkSMPropertyHelper(sphere, "Radius").Set(1.0);
sphere->UpdateVTKObjects();
Utkarsh
More information about the ParaView
mailing list