-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Labels
issue:bugSomething isn't working... For use in issuesSomething isn't working... For use in issues
Description
Description of bug / unexpected behavior
There is a recursive
boolean parameter in the methods .suspend_updating()
and .resume_updating()
of mobjects. However, if I understand correctly what it is supposed to do, I think it is broken.
If I create a mobject with an updater, and I add to it a submobjects with other updaters, when I call main_object.suspend_updating(recursive=False)
all updaters get stopped.
RecursiveTest_bug.mp4
Expected behavior
I expect main_object.suspend_updating(recursive=False)
to only stop the updating of the main object, and not the ones of its submobjects.
RecursiveTest_expected.mp4
How to reproduce the issue
Code for reproducing the problem
class RecursiveTest(Scene):
def construct(self):
s = Square(3).add_updater(lambda a, dt: a.rotate(dt))
sul = Square(1).add_updater(lambda c, dt: c.move_to(s.get_vertices()[0]).rotate(-2*dt))
sur = Square(1).add_updater(lambda c, dt: c.move_to(s.get_vertices()[1]).rotate(-2*dt))
sdl = Square(1).add_updater(lambda c, dt: c.move_to(s.get_vertices()[2]).rotate(-2*dt))
sdr = Square(1).add_updater(lambda c, dt: c.move_to(s.get_vertices()[3]).rotate(-2*dt))
corners = VGroup(sul, sur, sdl, sdr)
s.add(corners)
self.add(s)
self.wait(3)
s.suspend_updating(recursive=False) # this should only stop the main square, not the small ones
self.wait(5)
Additional comments
I'm working on a PR linked to updaters (#1873), so I can fix this issue too if it is indeed an bug (I asked in the discord if people agree that this is an unexpected behavior but I didn't get any answers).
Metadata
Metadata
Assignees
Labels
issue:bugSomething isn't working... For use in issuesSomething isn't working... For use in issues
Type
Projects
Status
🆕 New