mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 19:46:21 +08:00
Have vmob.set_opacity default to opacity 1 if it's not specified
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user