mirror of
https://github.com/3b1b/manim.git
synced 2025-07-30 05:24:22 +08:00
Don't deepcopy parents
This commit is contained in:
@ -211,8 +211,9 @@ class Mobject(Container):
|
|||||||
def deepcopy(self):
|
def deepcopy(self):
|
||||||
parents = self.parents
|
parents = self.parents
|
||||||
self.parents = []
|
self.parents = []
|
||||||
return copy.deepcopy(self)
|
result = copy.deepcopy(self)
|
||||||
self.parents = parents
|
self.parents = parents
|
||||||
|
return result
|
||||||
|
|
||||||
def generate_target(self, use_deepcopy=False):
|
def generate_target(self, use_deepcopy=False):
|
||||||
self.target = None # Prevent exponential explosion
|
self.target = None # Prevent exponential explosion
|
||||||
|
Reference in New Issue
Block a user