diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-28 12:17:28 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-28 12:17:28 +0400 |
commit | edf244cbf70d569484b937f58aa9fd69b4243bd5 (patch) | |
tree | 6b5db10bcfc03797db976bfaf29153fb91065da8 /doc/python_api/examples/bpy.ops.py | |
parent | 20e854bb16b0a1063ae413288fe46a232640cfbb (diff) |
document calling operators with undo enabled.
Diffstat (limited to 'doc/python_api/examples/bpy.ops.py')
-rw-r--r-- | doc/python_api/examples/bpy.ops.py | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/doc/python_api/examples/bpy.ops.py b/doc/python_api/examples/bpy.ops.py index 20e8773652d..9964ad915bf 100644 --- a/doc/python_api/examples/bpy.ops.py +++ b/doc/python_api/examples/bpy.ops.py @@ -1,6 +1,6 @@ """ Calling Operators -+++++++++++++++++ +----------------- Provides python access to calling operators, this includes operators written in C, Python or Macros. @@ -18,6 +18,26 @@ there is a poll() method to avoid this problem. Note that the operator ID (bl_idname) in this example is 'mesh.subdivide', 'bpy.ops' is just the access path for python. + + +Keywords and Positional Arguments +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +For calling operators keywords are used for operator properties and +positional arguments are used to define how the operator is called. + +There are 3 optional positional arguments (documented in detail below). + +.. code-block:: python + + bpy.ops.test.operator(override_context, execution_context, undo) + +* override_context - dict type +* execution_context - string (enum) +* undo - boolean + + +Each of these arguments is optional, but must be given in the order above. """ import bpy |