MultiBlock.depth#
- property MultiBlock.depth: int[source]#
Return the number of
MultiBlocklevels, including this one.A
MultiBlockwith no nestedMultiBlockblocks has a depth of 1.Added in version 0.50.
Examples#
Download Python source code | Download Jupyter notebook
>>> import pyvista as pv
>>> multi = pv.MultiBlock([pv.Sphere()])
>>> multi.depth
1
>>> nested = pv.MultiBlock([multi, pv.MultiBlock([multi])])
>>> nested.depth
3