diff --git a/python/plugins/processing/core/parameters.py b/python/plugins/processing/core/parameters.py index ab84ef589ae..f0620565163 100644 --- a/python/plugins/processing/core/parameters.py +++ b/python/plugins/processing/core/parameters.py @@ -58,7 +58,10 @@ class Parameter(object): take as input. """ - def __init__(self, name='', description='', default=None, optional=False): + default_metadata = {} + + def __init__(self, name='', description='', default=None, optional=False, + metadata={}): self.name = name self.description = description self.default = default @@ -73,6 +76,10 @@ class Parameter(object): self.optional = parseBool(optional) + # TODO: make deep copy and deep update + self.metadata = self.default_metadata.copy() + self.metadata.update(metadata) + def setValue(self, obj): """ Sets the value of the parameter.