mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Simplify VMobject.set_rgba_array
This commit is contained in:
parent
4629e08769
commit
3d0fe27c55
1 changed files with 4 additions and 12 deletions
|
@ -166,19 +166,11 @@ class VMobject(Mobject):
|
|||
def set_rgba_array(
|
||||
self,
|
||||
rgba_array: Vect4Array,
|
||||
name: str | None = None,
|
||||
name: str = "stroke_rgba",
|
||||
recurse: bool = False
|
||||
) -> Self:
|
||||
if name is None:
|
||||
names = ["fill_rgba", "stroke_rgba"]
|
||||
else:
|
||||
names = [name]
|
||||
|
||||
for name in names:
|
||||
super().set_rgba_array(rgba_array, name, recurse)
|
||||
if name == "fill_rgba":
|
||||
self.note_changed_fill()
|
||||
elif name == "stroke_rgba":
|
||||
self.note_changed_stroke()
|
||||
return self
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue