[processing] fixed creating params and outputs from description strings

This commit is contained in:
volaya 2016-10-17 14:41:16 +02:00
parent 52a0082ade
commit 25d0351d57
2 changed files with 4 additions and 2 deletions

View File

@ -396,7 +396,7 @@ class OutputVector(Output):
def getOutputFromString(s):
try:
if "|" in s:
if "|" in s and s.startswith("Output"):
tokens = s.split("|")
params = [t if str(t) != "None" else None for t in tokens[1:]]
clazz = getattr(sys.modules[__name__], tokens[0])

View File

@ -1513,7 +1513,7 @@ paramClasses = [c for c in list(sys.modules[__name__].__dict__.values()) if iscl
def getParameterFromString(s):
# Try the parameter definitions used in description files
if '|' in s:
if '|' in s and (s.startswith("Parameter") or s.startswith("*Parameter")):
isAdvanced = False
if s.startswith("*"):
s = s[1:]
@ -1535,3 +1535,5 @@ def getParameterFromString(s):
return param
except AttributeError:
pass
except:
return None