[python] cannot delete hidden clipping planes

Why doesn’t the following work?

def del_clips():
    clips_ids = [clip_id for clip_id in rs.AllObjects() if rs.ObjectType(clip_id) == rs.filter.clippingplane]
    print len(clips_ids)
    for view in sc.doc.Views:
        sc.doc.Views.ActiveView = view
        result = rs.DeleteObjects(clips_ids)
        if result > 0:
            print "{} clipping plane(s) deleted".format(result)

del_clips()

I did not select only selectable objects I use rs.AllObjects(). That usually gets even hidden objects.
Why do I have to show the clipping planes before deleting them?

In general, Rhino does not let you delete hidden objects. Just unhide and then delete.

– Dale

I believe it works with hidden 3d objects, it doesn’t work only with clipping planes.