[Paraview] Two Sided Lighting

Moreland, Kenneth kmorel at sandia.gov
Tue Feb 13 12:50:28 EST 2007


> I chose to hack up ParaView. I did the following:
> 
> vtkSMRenderModuleProxy.cxx
>      In Function void vtkSMRenderModuleProxy::CreateVTKObjects(int
> numObjects)
>        Just before the closing brace of the function add the
following:
>        this->GetRenderer()->TwoSidedLightingOff();
> 
> This basically does what I want. I would actually rather add a toggle
> button into the UI, like in the 3D view properties pane. I am using
> PV 2.6 and on OS X 10.4.8 Intel (MacBook Pro). Could you give me a
> hint on where to look to add a button? Do I modify an XML file in the
> GUI or Server sectiosn?

I'm not the expert, but I think the correct thing to do is add a
TwoSidedLighting property to the Renderer proxy in rendering.xml and
then expose that property in the Renderer subproxy of the
SimpleRenderModule proxy (also defined in rendering.xml).  Then you can
modify vtkPVRenderView.cxx to create an option in the GUI and pass that
to the exposed property in the render module.  Use the "Use parallel
projection" option as example.

-Ken



More information about the ParaView mailing list