From eb5fc90f44521411ca85aa1ed45be1bd981a7f6f Mon Sep 17 00:00:00 2001 From: volaya Date: Wed, 21 Sep 2016 10:49:36 +0200 Subject: [PATCH] [processing] dont use hidden outputs when exporting to python or displaying alg help fixes #14998 Conflicts: python/plugins/processing/core/GeoAlgorithm.py --- python/plugins/processing/core/GeoAlgorithm.py | 3 ++- python/plugins/processing/modeler/ModelerAlgorithm.py | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/python/plugins/processing/core/GeoAlgorithm.py b/python/plugins/processing/core/GeoAlgorithm.py index e7fbd43471d..7f39d5d8e18 100644 --- a/python/plugins/processing/core/GeoAlgorithm.py +++ b/python/plugins/processing/core/GeoAlgorithm.py @@ -462,7 +462,8 @@ class GeoAlgorithm(object): for param in self.parameters: s += '\t' + str(param) + '\n' for out in self.outputs: - s += '\t' + str(out) + '\n' + if not out.hidden: + s += '\t' + str(out) + '\n' s += '\n' return s diff --git a/python/plugins/processing/modeler/ModelerAlgorithm.py b/python/plugins/processing/modeler/ModelerAlgorithm.py index cbf5c38c59b..dc00787f7bd 100644 --- a/python/plugins/processing/modeler/ModelerAlgorithm.py +++ b/python/plugins/processing/modeler/ModelerAlgorithm.py @@ -154,10 +154,11 @@ class Algorithm(object): return str(value) params.append(_toString(value)) for out in self.algorithm.outputs: - if out.name in self.outputs: - params.append(safeName(self.outputs[out.name].description).lower()) - else: - params.append(str(None)) + if not out.hidden: + if out.name in self.outputs: + params.append(safeName(self.outputs[out.name].description).lower()) + else: + params.append(str(None)) s.append("outputs_%s=processing.runalg('%s', %s)" % (self.name, self.consoleName, ",".join(params))) return s