A few scene bug fixes

This commit is contained in:
Grant Sanderson 2017-10-24 13:41:28 -07:00
parent de0e156444
commit 3d9d3be142

View file

@ -83,8 +83,9 @@ class Scene(object):
""" """
caller_locals = inspect.currentframe().f_back.f_locals caller_locals = inspect.currentframe().f_back.f_locals
for key, value in caller_locals.items(): for key, value in caller_locals.items():
if value in objects: for o in objects:
setattr(self, key, value) if value is o:
setattr(self, key, value)
for key, value in newly_named_objects.items(): for key, value in newly_named_objects.items():
setattr(self, key, value) setattr(self, key, value)
return self return self
@ -348,7 +349,7 @@ class Scene(object):
animations.pop() animations.pop()
#method should already have target then. #method should already have target then.
else: else:
mobject.target = mobject.deepcopy() mobject.target = mobject.copy()
state["curr_method"].im_func( state["curr_method"].im_func(
mobject.target, *state["method_args"] mobject.target, *state["method_args"]
) )