Skip to content

fix(creation): honor suspend_mobject_updating in Create/Uncreate#4849

Closed
Chessing234 wants to merge 1 commit into
ManimCommunity:mainfrom
Chessing234:fix/4763-create-suspend-updating
Closed

fix(creation): honor suspend_mobject_updating in Create/Uncreate#4849
Chessing234 wants to merge 1 commit into
ManimCommunity:mainfrom
Chessing234:fix/4763-create-suspend-updating

Conversation

@Chessing234

Copy link
Copy Markdown

Changelog / Overview

Create/Uncreate ignored suspend_mobject_updating: updaters on the target kept running during the animation.

Cause

ShowPartial rebuilds the mobject every frame from starting_mobject via pointwise_become_partial. Animation.begin() only suspends self.mobject, so the reference copy's updaters kept firing (it is in get_all_mobjects_to_update) and their drift was copied back into the result each frame — making the flag a no-op.

Fix

When suspend_mobject_updating is set, also suspend starting_mobject in ShowPartial.begin().

Testing

def upd(m, dt): m.shift(RIGHT*dt)
d1 = Dot().add_updater(upd); d2 = Dot().add_updater(upd)
self.play(Create(d1, suspend_mobject_updating=True),
          Create(d2, suspend_mobject_updating=False), run_time=2)
# before: d1.x == d2.x == 1.93 (both drift)
# after:  d1.x == 0.0, d2.x == 1.93

Existing tests/module/animation/test_creation.py pass.

Fixes #4763

Made with Cursor

ShowPartial rebuilds the mobject each frame from starting_mobject via
pointwise_become_partial. begin() only suspended self.mobject, so the
reference copy's updaters kept running and their drift leaked back into
the result, making suspend_mobject_updating a no-op. Suspend the
starting_mobject too when the flag is set.

Fixes ManimCommunity#4763

Co-authored-by: Cursor <cursoragent@cursor.com>
@Chessing234

Copy link
Copy Markdown
Author

Superseded by rebased #4879 (old branch had diverged from main).

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.

Create() does not suspend Mobject updating

2 participants