mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 19:46:21 +08:00
By default, don't let Mobject.become match updaters
This causes the use of Mobject.become in an updater function to make the mobject immediately lose its updater. https://github.com/3b1b/manim/issues/1877
This commit is contained in:
@ -627,7 +627,7 @@ class Mobject(object):
|
||||
mobject = pickle.load(fp)
|
||||
return mobject
|
||||
|
||||
def become(self, mobject: Mobject):
|
||||
def become(self, mobject: Mobject, match_updaters=False):
|
||||
"""
|
||||
Edit all data and submobjects to be idential
|
||||
to another mobject
|
||||
@ -647,7 +647,8 @@ class Mobject(object):
|
||||
if isinstance(value, Mobject) and value in family2:
|
||||
setattr(self, attr, family1[family2.index(value)])
|
||||
self.refresh_bounding_box(recurse_down=True)
|
||||
self.match_updaters(mobject)
|
||||
if match_updaters:
|
||||
self.match_updaters(mobject)
|
||||
return self
|
||||
|
||||
def looks_identical(self, mobject: Mobject):
|
||||
|
Reference in New Issue
Block a user