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(
|
def set_clip_plane(
|
||||||
self,
|
self,
|
||||||
vect: Vect3 | None = None,
|
vect: Vect3 | None = None,
|
||||||
threshold: float | None = None
|
threshold: float | None = None,
|
||||||
|
recurse=True
|
||||||
) -> Self:
|
) -> Self:
|
||||||
if vect is not None:
|
for submob in self.get_family(recurse):
|
||||||
self.uniforms["clip_plane"][:3] = vect
|
if vect is not None:
|
||||||
if threshold is not None:
|
submob.uniforms["clip_plane"][:3] = vect
|
||||||
self.uniforms["clip_plane"][3] = threshold
|
if threshold is not None:
|
||||||
|
submob.uniforms["clip_plane"][3] = threshold
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def deactivate_clip_plane(self) -> Self:
|
def deactivate_clip_plane(self) -> Self:
|
||||||
|
|
Loading…
Add table
Reference in a new issue