Skip to content

16806: Fix vtkImageActor translucency check

David Gobbi requested to merge dgobbi/vtk:16806-image-actor-translucent into master

The HasTranslucentPolygonalGeometry() check in vtkImageActor expected the mapper to have been updated. Whether mapper::Update() is called beforehand can depend on tricky details such as the ordering of props in the renderer, so it is not something we can rely on. The new code will do a timestamp check, and if necessary, will call UpdateInformation() before checking the number of scalar components and the data type to see if the image has an alpha component.

In addition, the new ForceOpaqueOn() and ForceTranslucentOn() methods can be used to force the return value of HasTranslucentPolygonalGeometry() to 1 or 0. These methods are already present in vtkActor, and it also makes sense to have them in vtkImageActor.

Closes #16806 (closed)

Merge request reports