[Paraview] Opacity transfer function in pvpython

Ross Gardiner ross.gardiner at ultrahaptics.com
Mon Jul 24 07:01:38 EDT 2017


Hi yoshimi,

Thanks – your suggestion helped me find a solution:


opacity_map = CreatePiecewiseFunction(Points=[44.0, 0.0, 0.5, 0.0, 132.0, 0.0, 0.5, 0.0, 154.0, 1.0, 0.5, 0.0]) 
representation.LookupTable.ScalarOpacityFunction = opacity_map
representation.ScalarOpacityFunction = opacity_map

I believe what’s going on here is that the LookupTable editor in ParaView gets its data from LookupTable.ScalarOpacityFunction, while the renderer gets it from representation.ScalarOpacityFunction. If they’re both initialised separately, updating the opacity mapping in the colour map editor does not cause the rendering to update. If they both reference the same object, it works as expected.

- Ross

On 22/07/2017, 11:12, "kenichiro yoshimi" <rccm.kyoshimi at gmail.com> wrote:

    c



More information about the ParaView mailing list