-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Updaters fix #838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updaters fix #838
Conversation
|
🎉 Great news! Looks like all the dependencies have been resolved: 💡 To add or remove a dependency please update this issue/PR description. Brought to you by Dependent Issues (:robot: ). Happy coding! |
|
These videos showcase the difference between the code with and without the fix; both were rendered from the same script. not-fixed.mp4fixed.mp4 |
behackl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I also agree with your assessment that the removal of submobjects currently is ... unintuitive, and should be refactored eventually.
(I also checked the rendered animations in our documentation for good measure, they all still seem fine.)
huguesdevimeux
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM.
A test would be useful IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought this actually needs a test.
COuld you create one?
List of Changes
Update
Scene.moving_mobjectsinScene.add(). Depends on #830 for its Scene refactoring.Motivation
When a mobject is added by an updater in the middle of an animation,
Scene.moving_mobjectsisn't updated. As a result, the added mobject won't appear in the Scene.Changelog Entry
Mobjects added during an updater are added to Scene.moving_mobjects.
Testing Status
As long as we can only test the final frame this change can't be tested.
Further Comments
The way that manim removes submobjects within a group by splitting the group apart and re-adding the parts that weren't removed is very strange. It make much more sense to me to remove submobjects by removing the reference in their parent's submobjects list and leave out the logic in
Scene.restructure_mobjects()entirely. In particular, I've never encountered another graphics program that handles nested objects the way manim currently does.Acknowledgements
docs/source/changelog.rst