mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Have vmob.set_opacity default to opacity 1 if it's not specified
This commit is contained in:
parent
8159f701f4
commit
8485ff8c76
1 changed files with 5 additions and 0 deletions
|
@ -129,6 +129,11 @@ class VMobject(Mobject):
|
|||
return self
|
||||
|
||||
def set_fill(self, color=None, opacity=None, family=True):
|
||||
# Assume that if it was opacity 0, and set_fill
|
||||
# is called, the intent is for it to now be 1.
|
||||
if opacity is None:
|
||||
opacity = 1
|
||||
|
||||
if family:
|
||||
for sm in self.submobjects:
|
||||
sm.set_fill(color, opacity, family)
|
||||
|
|
Loading…
Add table
Reference in a new issue