Skip to content

Commit

Permalink
[processing] dont use hidden outputs when exporting to python or disp…
Browse files Browse the repository at this point in the history
…laying alg help

fixes #14998
  • Loading branch information
volaya committed Oct 4, 2016
1 parent 7370ade commit 421251a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion python/plugins/processing/core/GeoAlgorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,8 @@ def __str__(self):
for param in self.parameters:
s += '\t' + unicode(param) + '\n'
for out in self.outputs:
s += '\t' + unicode(out) + '\n'
if not out.hidden:
s += '\t' + unicode(out) + '\n'
s += '\n'
return s

Expand Down
9 changes: 5 additions & 4 deletions python/plugins/processing/modeler/ModelerAlgorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,11 @@ def _toString(v):
return unicode(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

Expand Down

0 comments on commit 421251a

Please sign in to comment.