# Potential Bug in vtkAbstractMapper::RemoveAllClippingPlanes() - Missing Modified() Call

**URL:** <https://discourse.vtk.org/t/potential-bug-in-vtkabstractmapper-removeallclippingplanes-missing-modified-call/15346>\
**Category:** Development\
**Tags:** code\
**Created:** [March 6, 2025, 6:30am UTC](https://discourse.vtk.org/t/potential-bug-in-vtkabstractmapper-removeallclippingplanes-missing-modified-call/15346 "2025-03-06T06:30:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![omkar](https://discourse.vtk.org/user_avatar/discourse.vtk.org/omkar/32/9842_2.png) [@omkar](https://discourse.vtk.org/u/omkar)\
**Post date:** [March 6, 2025, 6:30am UTC](https://discourse.vtk.org/t/potential-bug-in-vtkabstractmapper-removeallclippingplanes-missing-modified-call/15346/1 "2025-03-06T06:30:40Z")

</div>

> <https://github.com/Kitware/VTK/blob/6732e34cf2d607a2835e867e5d8eb530393c37ec/Rendering/Core/vtkAbstractMapper.cxx#L79>

I have noticed an interesting behavior in the `[vtkAbstractMapper::RemoveAllClippingPlanes()](https://github.com/Kitware/VTK/blob/6732e34cf2d607a2835e867e5d8eb530393c37ec/Rendering/Core/vtkAbstractMapper.cxx#L79)` method, where the `Modified()` function is not called, while it is called inside the `[vtkAbstractMapper::RemoveClippingPlane(vtkPlane* plane)](https://github.com/Kitware/VTK/blob/6732e34cf2d607a2835e867e5d8eb530393c37ec/Rendering/Core/vtkAbstractMapper.cxx#L68)` method.

The absence of the `Modified()` call in `RemoveAllClippingPlanes()` seems to cause incorrect shader selection for the actor when all clipping planes are removed. This is in contrast to the `RemoveClippingPlane()` method, where `Modified()` is correctly invoked after removing a single clipping plane.

Is there a specific reason why `Modified()` is not called in `RemoveAllClippingPlanes()`? Could this potentially be a bug, or is there an intended design choice behind this behavior?

Looking forward to your insights!

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)\
**Post date:** [March 6, 2025, 11:00am UTC](https://discourse.vtk.org/t/potential-bug-in-vtkabstractmapper-removeallclippingplanes-missing-modified-call/15346/2 "2025-03-06T11:00:15Z")

</div>

@sankhesh ?
