mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
More robust Mobject.become
This commit is contained in:
parent
0a601927e0
commit
0b003fff44
1 changed files with 3 additions and 6 deletions
|
@ -977,12 +977,9 @@ class Mobject(Container):
|
|||
Edit points, colors and submobjects to be idential
|
||||
to another mobject
|
||||
"""
|
||||
self.align_points(mobject)
|
||||
self.interpolate(self, mobject, 1)
|
||||
self.submobjects = [
|
||||
sm.copy() if copy_submobjects else sm
|
||||
for sm in mobject.submobjects
|
||||
]
|
||||
self.align_data(mobject)
|
||||
for sm1, sm2 in zip(self.get_family(), mobject.get_family()):
|
||||
sm1.interpolate(sm1, sm2, 1)
|
||||
return self
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue