diff options
Diffstat (limited to 'doc/python_api/examples/bpy.ops.1.py')
-rw-r--r-- | doc/python_api/examples/bpy.ops.1.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/python_api/examples/bpy.ops.1.py b/doc/python_api/examples/bpy.ops.1.py new file mode 100644 index 00000000000..f43be2b0f63 --- /dev/null +++ b/doc/python_api/examples/bpy.ops.1.py @@ -0,0 +1,22 @@ +""" +Execution Context ++++++++++++++++++ + +When calling an operator you may want to pass the execution context. + +This determines the context thats given to the operator to run in, and weather +invoke() is called or execute(). + +'EXEC_DEFAULT' is used by default but you may want the operator to take user +interaction with 'INVOKE_DEFAULT'. + +The execution context is as a non keyword, string argument in: +('INVOKE_DEFAULT', 'INVOKE_REGION_WIN', 'INVOKE_REGION_CHANNELS', +'INVOKE_REGION_PREVIEW', 'INVOKE_AREA', 'INVOKE_SCREEN', 'EXEC_DEFAULT', +'EXEC_REGION_WIN', 'EXEC_REGION_CHANNELS', 'EXEC_REGION_PREVIEW', 'EXEC_AREA', +'EXEC_SCREEN') +""" + +# group add popup +import bpy +bpy.ops.object.group_instance_add('INVOKE_DEFAULT') |