Skip to content
Permalink
Browse files

Add metadata property to parameters

  • Loading branch information
arnaud-morvan authored and volaya committed Oct 5, 2016
1 parent 484fd18 commit 2ad27b172ea12add240bc256a1f183b0c71e2e70
Showing with 8 additions and 1 deletion.
  1. +8 −1 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 @@ def __init__(self, name='', description='', default=None, optional=False):

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.

0 comments on commit 2ad27b1

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