Ejemplo n.º 1
0
def wrap(node, show=True):
    """wrap node with a SoSwitch, returns the switch"""
    switch = SoSwitch()
    switch.addChild(getattr(node, 'root', node))
    switch.whichChild = SO_SWITCH_ALL if show else SO_SWITCH_NONE
    return switch