mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Have clip plane recurse through family
This commit is contained in:
parent
003c4d8626
commit
9475fcd19e
1 changed files with 7 additions and 5 deletions
|
@ -1950,12 +1950,14 @@ class Mobject(object):
|
|||
def set_clip_plane(
|
||||
self,
|
||||
vect: Vect3 | None = None,
|
||||
threshold: float | None = None
|
||||
threshold: float | None = None,
|
||||
recurse=True
|
||||
) -> Self:
|
||||
if vect is not None:
|
||||
self.uniforms["clip_plane"][:3] = vect
|
||||
if threshold is not None:
|
||||
self.uniforms["clip_plane"][3] = threshold
|
||||
for submob in self.get_family(recurse):
|
||||
if vect is not None:
|
||||
submob.uniforms["clip_plane"][:3] = vect
|
||||
if threshold is not None:
|
||||
submob.uniforms["clip_plane"][3] = threshold
|
||||
return self
|
||||
|
||||
def deactivate_clip_plane(self) -> Self:
|
||||
|
|
Loading…
Add table
Reference in a new issue