Skip to content
Permalink
Browse files

[processing] Make ParameterFixedTable scriptable

  • Loading branch information
m-kuhn committed Dec 21, 2016
1 parent 2af00be commit 0a686c4fca64facbf7e67adb51c838764d6d44a6
Showing with 9 additions and 2 deletions.
  1. +9 −2 python/plugins/processing/core/parameters.py
@@ -561,12 +561,19 @@ def tableToString(table):
tablestring = tablestring[:-1]
return tablestring

def getAsScriptCode(self):
param_type = ''
if self.optional:
param_type += 'optional '
param_type += 'fixedtable'
return '##' + self.name + '=' + param_type

@classmethod
def fromScriptCode(self, line):
isOptional, name, definition = _splitParameterOptions(line)
if definition.startswith("point"):
if definition.startswith("fixedtable"):
descName = _createDescriptiveName(name)
default = definition.strip()[len('point') + 1:] or None
default = definition.strip()[len('fixedtable') + 1:] or None
return ParameterFixedTable(name, descName, default, isOptional)


0 comments on commit 0a686c4

Please sign in to comment.
You can’t perform that action at this time.