mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Changed default behavior of VMobject.set_fill from setting opacity to 1 if nothing was specified and it started at 0
This commit is contained in:
parent
069b34f17c
commit
c42148c195
1 changed files with 0 additions and 7 deletions
|
@ -65,13 +65,6 @@ class VMobject(Mobject):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def set_fill(self, color = None, opacity = None, family = True):
|
def set_fill(self, color = None, opacity = None, family = True):
|
||||||
probably_meant_to_change_opacity = reduce(op.and_, [
|
|
||||||
color is not None,
|
|
||||||
opacity is None,
|
|
||||||
self.fill_opacity == 0
|
|
||||||
])
|
|
||||||
if probably_meant_to_change_opacity:
|
|
||||||
opacity = 1
|
|
||||||
return self.set_style_data(
|
return self.set_style_data(
|
||||||
fill_color = color,
|
fill_color = color,
|
||||||
fill_opacity = opacity,
|
fill_opacity = opacity,
|
||||||
|
|
Loading…
Add table
Reference in a new issue