More robust Mobject.become

This commit is contained in:
Grant Sanderson 2018-08-26 13:17:23 -07:00
parent 0a601927e0
commit 0b003fff44

View file

@ -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