parameters: (parent, vpType = None)
docstring: Safe constructor that also takes CREATENEW, VPLEFT, VPTOP, etc.
docstring_summary: Safe constructor that also takes CREATENEW, VPLEFT, VPTOP, etc.
docstring_tokens: Safe constructor that also takes CREATENEW VPLEFT VPTOP etc .
function: def make(parent, vpType = None):
          """Safe constructor that also takes CREATENEW, VPLEFT, VPTOP, etc."""
          if vpType is None or vpType == CREATENEW:
              return Viewport(parent)
          if isinstance(vpType, Viewport):
              return vpType
          if vpType == VPLEFT:
              return Viewport.makeLeft(parent)
          if vpType == VPFRONT:
              return Viewport.makeFront(parent)
          if vpType == VPTOP:
              return Viewport.makeTop(parent)
          if vpType == VPPERSPECTIVE:
              return Viewport.makePerspective(parent)
          raise TypeError("Unknown viewport type: %s" % vpType)
function_tokens: def make ( parent , vpType = None ) : if vpType is None or vpType == CREATENEW : return Viewport ( parent ) if isinstance ( vpType , Viewport ) : return vpType if vpType == VPLEFT : return Viewport . makeLeft ( parent ) if vpType == VPFRONT : return Viewport . makeFront ( parent ) if vpType == VPTOP : return Viewport . makeTop ( parent ) if vpType == VPPERSPECTIVE : return Viewport . makePerspective ( parent ) raise TypeError ( "Unknown viewport type: %s" % vpType )