Welcome to mirror list, hosted at ThFree Co, Russian Federation.

bpy.ops.2.py « examples « python_api « doc - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dd88c73d5e9f4f0b4223f5b022150bad5a7fa7d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""
.. _operator-execution_context:

Execution Context
-----------------

When calling an operator you may want to pass the execution context.

This determines the context that is given for the operator to run in, and whether
invoke() is called or only execute().

'EXEC_DEFAULT' is used by default, running only the execute() method, but you may
want the operator to take user interaction with 'INVOKE_DEFAULT' which will also
call invoke() if existing.

The execution context is one of:
('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')