Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4125

How to disable clipping plane via script (RemoveViewportId) method

$
0
0

I’m can’t figure out how to make RemoveClipViewportId method to work. I couldn’t find any example on the forum yet. ClippingPlanes seem to have the same ViewportIds property after running this method :thinking:

Rhino 8 WIP

import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino

def DisableAllClippingPlanes():
    clipping_planes = [i for i in sc.doc.Objects if type(i) == Rhino.DocObjects.ClippingPlaneObject]
    
    for clipping_plane in clipping_planes:
clipping_plane.ClippingPlaneGeometry.RemoveClipViewportId(sc.doc.Views.ActiveView.ActiveViewportID)
        rs.EnableRedraw()
        rs.Redraw()

DisableAllClippingPlanes()

2 posts - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4125