Skip to content


Less verbose template function message.
Browse files Browse the repository at this point in the history
args='auto' and group='custom' as default
  • Loading branch information
NathanW2 committed May 27, 2015
1 parent e255d6c commit f214491
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion python/core/
Expand Up @@ -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.
Expand Down
11 changes: 4 additions & 7 deletions python/
Expand Up @@ -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.