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
|
Edit points, colors and submobjects to be idential
|
||||||
to another mobject
|
to another mobject
|
||||||
"""
|
"""
|
||||||
self.align_points(mobject)
|
self.align_data(mobject)
|
||||||
self.interpolate(self, mobject, 1)
|
for sm1, sm2 in zip(self.get_family(), mobject.get_family()):
|
||||||
self.submobjects = [
|
sm1.interpolate(sm1, sm2, 1)
|
||||||
sm.copy() if copy_submobjects else sm
|
|
||||||
for sm in mobject.submobjects
|
|
||||||
]
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue