Transform copies ending mobjects

This commit is contained in:
Grant Sanderson
2016-01-09 20:07:03 -08:00
parent a1915afc82
commit 454502b403

View File

@ -16,7 +16,9 @@ class Transform(Animation):
"should_black_out_extra_points" : False "should_black_out_extra_points" : False
} }
def __init__(self, mobject, ending_mobject, **kwargs): def __init__(self, mobject, ending_mobject, **kwargs):
mobject, ending_mobject = map(instantiate, [mobject, ending_mobject]) mobject = instantiate(mobject)
#Copy ending_mobject so as to not mess with caller
ending_mobject = instantiate(ending_mobject).copy()
digest_config(self, kwargs, locals()) digest_config(self, kwargs, locals())
count1, count2 = mobject.get_num_points(), ending_mobject.get_num_points() count1, count2 = mobject.get_num_points(), ending_mobject.get_num_points()
if count2 == 0: if count2 == 0: