From 25d0351d57cdf57b50f4cc67a8b43dcb41661d98 Mon Sep 17 00:00:00 2001 From: volaya Date: Mon, 17 Oct 2016 14:41:16 +0200 Subject: [PATCH] [processing] fixed creating params and outputs from description strings --- python/plugins/processing/core/outputs.py | 2 +- python/plugins/processing/core/parameters.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/python/plugins/processing/core/outputs.py b/python/plugins/processing/core/outputs.py index 60fbee6f6d2..57f30e569ed 100644 --- a/python/plugins/processing/core/outputs.py +++ b/python/plugins/processing/core/outputs.py @@ -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]) diff --git a/python/plugins/processing/core/parameters.py b/python/plugins/processing/core/parameters.py index 02a8636e203..dfe4dc165b9 100644 --- a/python/plugins/processing/core/parameters.py +++ b/python/plugins/processing/core/parameters.py @@ -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