Skip to content
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

Add a suspended_updating context manager to Mobject #4101

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

barollet
Copy link

@barollet barollet commented Jan 12, 2025

Overview: What does this pull request change?

It adds a context manager to disable updaters of a Mobject. You can see the documention example in the commit.

There is a breaking change: suspend_updating and resume_updating does not return anything anymore. They used to return the Mobject itself.

Motivation and Explanation: Why and how do your changes improve the library?

When writing manim code with many small updaters you may want to disable them for a short time only. For example when using the Indicate animation.

Links to added or changed documentation pages

https://manimce--4101.org.readthedocs.build/en/4101/reference/manim.mobject.mobject.Mobject.html#manim.mobject.mobject.Mobject.suspended_updating

Further Information and Comments

Reviewer Checklist

  • The PR title is descriptive enough for the changelog, and the PR is labeled correctly
  • If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
  • If applicable: newly added functions and classes are tested

…xt manager to disable updating in a with block
@barollet barollet marked this pull request as draft January 12, 2025 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant