mirror of
https://github.com/3b1b/manim.git
synced 2025-07-31 05:52:34 +08:00
Fix get_style for null point case
This commit is contained in:
@ -282,10 +282,11 @@ class VMobject(Mobject):
|
|||||||
return self
|
return self
|
||||||
|
|
||||||
def get_style(self):
|
def get_style(self):
|
||||||
|
data = self.data if self.get_num_points() > 0 else self._data_defaults
|
||||||
return {
|
return {
|
||||||
"fill_rgba": self.data['fill_rgba'].copy(),
|
"fill_rgba": data['fill_rgba'].copy(),
|
||||||
"stroke_rgba": self.data['stroke_rgba'].copy(),
|
"stroke_rgba": data['stroke_rgba'].copy(),
|
||||||
"stroke_width": self.data['stroke_width'].copy(),
|
"stroke_width": data['stroke_width'].copy(),
|
||||||
"stroke_background": self.draw_stroke_behind_fill,
|
"stroke_background": self.draw_stroke_behind_fill,
|
||||||
"reflectiveness": self.get_reflectiveness(),
|
"reflectiveness": self.get_reflectiveness(),
|
||||||
"gloss": self.get_gloss(),
|
"gloss": self.get_gloss(),
|
||||||
|
Reference in New Issue
Block a user