Hi, SetVisOption is deprecated, you should use SetVisContainers() for the volume you are going to draw. The default is SetVisLeaves(). Your example becomes:
import ROOT
import time
geoManager = ROOT.TGeoManager("Toto","toto")
# Create 3 volumes
tubeShape = ROOT.TGeoTube(0.,10.,10.)
tube = ROOT.TGeoVolume("Pepito", tubeShape)
cubeShape = ROOT.TGeoBBox(2.,2.,2.)
cube = ROOT.TGeoVolume("Pepita", cubeShape)
sphereShape = ROOT.TGeoSphere(0.,1.)
sphere = ROOT.TGeoVolume("Pepignito", sphereShape)
# Create the tree like : Tube > Cube > Sphere
tube.AddNode(cube,1)
cube.AddNode(sphere,1)
#Configure geoManager
geoManager.SetTopVolume(tube)
geoManager.CloseGeometry()
tube.SetLineColor(8)
geoManager.SetVisLevel(10)
geoManager.SetVisOption(0)
geoManager.SetTopVisible()
# Draw making all containers visible, down to geoManager->SetVisLevel()
tube.SetVisContainers()
tube.Draw()
while tube:
time.sleep(1)