MCPcopy
hub / github.com/ManimCommunity/manim / remove

Method remove

manim/mobject/mobject.py:626–651  ·  view source on GitHub ↗

Remove :attr:`submobjects`. The mobjects are removed from :attr:`submobjects`, if they exist. Subclasses of mobject may implement ``-`` and ``-=`` dunder methods. Parameters ---------- mobjects The mobjects to remove. Returns --

(self, *mobjects: Mobject)

Source from the content-addressed store, hash-verified

624 return self
625
626 def remove(self, *mobjects: Mobject) -> Self:
627 """Remove :attr:`submobjects`.
628
629 The mobjects are removed from :attr:`submobjects`, if they exist.
630
631 Subclasses of mobject may implement ``-`` and ``-=`` dunder methods.
632
633 Parameters
634 ----------
635 mobjects
636 The mobjects to remove.
637
638 Returns
639 -------
640 :class:`Mobject`
641 ``self``
642
643 See Also
644 --------
645 :meth:`add`
646
647 """
648 for mobject in mobjects:
649 if mobject in self.submobjects:
650 self.submobjects.remove(mobject)
651 return self
652
653 def __sub__(self, other):
654 raise NotImplementedError

Callers 11

test_mobject_removeFunction · 0.95
add_to_backMethod · 0.95
remove_updaterMethod · 0.45
on_finishMethod · 0.45
_remove_vertexMethod · 0.45
_remove_edgeMethod · 0.45
__init__Method · 0.45
slide_and_uncoverMethod · 0.45
slide_backMethod · 0.45
finish_updater_cycleMethod · 0.45
end_animationMethod · 0.45

Calls

no outgoing calls

Tested by 1

test_mobject_removeFunction · 0.76