# Fully clearing a Clipping Border

I've written some code that creates a clipping region using bpy.ops.view3d.clip_border(..) then to clear the clipping region I call bpy.ops.view3d.clip_border() again (with no values). This clears the region after a viewport re-draw, however, running context.space_data.region_3d.use_clip_planes() will return True and the viewport will still display "Clipped" in brackets in the info text.

Is there a way to completely clear the clipping through code, just like pressing Alt+B would do?

use_clip_planes is not readonly, you can change its value. You can disable the label with context.space_data.region_3d.use_clip_planes = False. It won't update in the viewport until your mouse enters the 2D space or you manually call a redraw : context.space_data.region_3d.tag_redraw()