Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Added print_mobject_family

Grant Sanderson81b8aff7bddc
diff --git a/helpers.py b/helpers.py
index 0c97c5569..bdf543653 100644
--- a/helpers.py
+++ b/helpers.py
@@ -666,3 +666,10 @@ class DictAsObject(object):
# Just to have a less heavyweight name for this extremely common operation
def fdiv(a, b):
return np.true_divide(a,b)
+
+# For debugging purposes
+
+def print_mobject_family(mob, n_tabs = 0):
+ print "\t"*n_tabs, mob, id(mob)
+ for submob in mob.submobjects:
+ print_mobject_family(submob, n_tabs + 1)