Add deep option to VMobject.copy

This commit is contained in:
Grant Sanderson 2022-12-28 19:22:41 -08:00
parent 4f37486655
commit a6ee54488b

View file

@ -148,8 +148,8 @@ class VMobject(Mobject):
raise Exception("All submobjects must be of type VMobject")
super().add(*vmobjects)
def copy(self) -> VMobject:
result = super().copy()
def copy(self, deep: bool = False) -> VMobject:
result = super().copy(deep)
result.shader_wrapper_list = [sw.copy() for sw in self.shader_wrapper_list]
return result