Skip to content
Browse files
Less verbose template function message.
args='auto' and group='custom' as default
  • Loading branch information
NathanW2 committed May 27, 2015
1 parent e255d6c commit f2144918d2ab0c19ebbba11a6e9f6894217cccf0
Showing with 5 additions and 8 deletions.
  1. +1 −1 python/core/
  2. +4 −7 python/
@@ -77,7 +77,7 @@ def func(self, values, feature, parent):
return f

def qgsfunction(args, group, **kwargs):
def qgsfunction(args='auto', group='custom', **kwargs):
Decorator function used to define a user expression function.
@@ -41,17 +41,14 @@ def load_user_expressions(path):
expressions.load = load_user_expressions
expressions.template = """\"\"\"
Template function file. Define new functions using @qgsfunction.
When using args="auto" you may define a new variable for each value for the function.
feature and parent must always be the last args.
To pass a any number of args into a function use args=-1 the first
variable will then be a list of values.
Define new functions using @qgsfunction. feature and parent must always be the
last args. Use args=-1 to pass a list of values as arguments
from qgis.core import *
from qgis.gui import *
@qgsfunction(args="auto", group='Custom')
def func(value1, feature, parent):
return value1

0 comments on commit f214491

Please sign in to comment.