Exemplo n.º 1
0
def getSavableParam(id, name):
    t = _vistle.getParameterType(id, name)
    if t == "String":
        return "'" + _vistle.getEscapedStringParam(id, name) + "'"
    elif t == "Vector":
        v = _vistle.getVectorParam(id, name)
        s = ''
        first = True
        for c in v:
            if not first:
                s += ', '
            first = False
            s += str(c)
        return s
    elif t == "IntVector":
        v = _vistle.getIntVectorParam(id, name)
        s = ''
        first = True
        for c in v:
            if not first:
                s += ', '
            first = False
            s += str(c)
        return s
    else:
        return getParameter(id, name)
Exemplo n.º 2
0
def getParameter(id, name):
    t = _vistle.getParameterType(id, name)

    if t == "Int":
        return _vistle.getIntParam(id, name)
    elif t == "Float":
        return _vistle.getFloatParam(id, name)
    elif t == "Vector":
        return _vistle.getVectorParam(id, name)
    elif t == "IntVector":
        return _vistle.getIntVectorParam(id, name)
    elif t == "String":
        return _vistle.getStringParam(id, name)
    elif t == "None":
        return None

    return None
Exemplo n.º 3
0
def getParameter(id, name):
   t = _vistle.getParameterType(id, name)

   if t == "Int":
      return _vistle.getIntParam(id, name)
   elif t == "Float":
      return _vistle.getFloatParam(id, name)
   elif t == "Vector":
      return _vistle.getVectorParam(id, name)
   elif t == "IntVector":
      return _vistle.getIntVectorParam(id, name)
   elif t == "String":
      return _vistle.getStringParam(id, name)
   elif t == "None":
      return None

   return None