Skip to content

Conversation

@UnMolDeQuimica
Copy link

Overview: What does this pull request change?

Modifies the Scence.replace function to replace the mobject with its replacements in both the scene and the Groups/VGroups it belongs to.

The main replace logic has been moved into another function named _replace to make this part more reusable.

You can check the test passing using uv run pytest tests/module/animation/test_transform.py

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

This was done to fix the test test_duplicate_references_in_multiple_groups that was failing. Also, now the functionality works as described in the replace docstring.

Links to added or changed documentation pages

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

…jects list

This will prevent duplicating replace logic when replacing in
scene.mobjects and in the ancestors of the mobject
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