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

Method copy

manim/mobject/mobject.py:884–897  ·  view source on GitHub ↗

Create and return an identical copy of the :class:`Mobject` including all :attr:`submobjects`. Returns ------- :class:`Mobject` The copy. Note ---- The clone is initially not visible in the Scene, even if the original was.

(self)

Source from the content-addressed store, hash-verified

882 )
883
884 def copy(self) -> Self:
885 """Create and return an identical copy of the :class:`Mobject` including all
886 :attr:`submobjects`.
887
888 Returns
889 -------
890 :class:`Mobject`
891 The copy.
892
893 Note
894 ----
895 The clone is initially not visible in the Scene, even if the original was.
896 """
897 return copy.deepcopy(self)
898
899 def generate_target(self, use_deepcopy: bool = False) -> Self:
900 self.target = None # Prevent unbounded linear recursion

Callers 15

test_mobject_copyFunction · 0.95
generate_targetMethod · 0.95
save_stateMethod · 0.95
get_piecesMethod · 0.95
arrange_in_gridMethod · 0.45
repeat_submobjectMethod · 0.45
becomeMethod · 0.45
_tree_layoutFunction · 0.45
_add_edgeMethod · 0.45
add_edgesMethod · 0.45

Calls 1

deepcopyMethod · 0.80

Tested by 1

test_mobject_copyFunction · 0.76