

def toggle_base_plane(theCheckBox, theParentFrame, plane_orientation):
#toggles the x,y, or z base planewidgets and all other planes of the same orientation
# takes the checkbox object on the button_plane of the gui, the main application
# frame and the orientation (0,1 or 2) as arguments

    if theCheckBox.GetValue() == True:
        for i in range(len(theParentFrame.PWG)):   
            theParentFrame.PWG[i][0].planewidgets[plane_orientation].GetTexturePlaneProperty().SetOpacity(1.0)
            theParentFrame.widget.Render()
    else:
        for i in range(len(theParentFrame.PWG)):   
            theParentFrame.PWG[i][0].planewidgets[plane_orientation].GetTexturePlaneProperty().SetOpacity(0.0)
            theParentFrame.widget.Render()