Fem: Allow clipping plane in edit mode

This commit is contained in:
marioalexis
2025-11-07 10:22:46 -03:00
committed by Max Wilfinger
parent f44af0929f
commit 2d531cc21b

View File

@@ -107,6 +107,11 @@ class _ClippingPlaneAdd(CommandManager):
)
self.is_active = "with_document"
def GetResources(self):
resources = super().GetResources()
resources["CmdType"] = "ForEdit | Alter3DView"
return resources
def Activated(self):
from pivy import coin
from femtools.femutils import getBoundBoxOfAllDocumentShapes
@@ -163,6 +168,11 @@ class _ClippingPlaneRemoveAll(CommandManager):
)
self.is_active = "with_document"
def GetResources(self):
resources = super().GetResources()
resources["CmdType"] = "ForEdit | Alter3DView"
return resources
def Activated(self):
line1 = "for node in list(sg.getChildren()):\n"
line2 = " if isinstance(node, coin.SoClipPlane):\n"