diff options
author | Campbell Barton <campbell@blender.org> | 2022-04-13 09:40:07 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-04-20 05:19:35 +0300 |
commit | f438344cf243632e497772cf1f855b9c8856fd37 (patch) | |
tree | d7121f1e456c2f499ba0e92dd2f38869c39b844c /source/blender/python/intern/CMakeLists.txt | |
parent | 6d9268c2c7362ec772a3ff956ee888e877682a01 (diff) |
PyAPI: temporary context override support
Support a way to temporarily override the context from Python.
- Added method `Context.temp_override` context manager.
- Special support for windowing variables "window", "area" and "region",
other context members such as "active_object".
- Nesting context overrides is supported.
- Previous windowing members are restored when the context exists unless
they have been removed.
- Overriding context members by passing a dictionary into operators in
`bpy.ops` has been deprecated and warns when used.
This allows the window in a newly loaded file to be used, see: T92464
Reviewed by: mont29
Ref D13126
Diffstat (limited to 'source/blender/python/intern/CMakeLists.txt')
-rw-r--r-- | source/blender/python/intern/CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/python/intern/CMakeLists.txt b/source/blender/python/intern/CMakeLists.txt index 86dc5800b67..e4e198ab812 100644 --- a/source/blender/python/intern/CMakeLists.txt +++ b/source/blender/python/intern/CMakeLists.txt @@ -60,6 +60,7 @@ set(SRC bpy_rna_anim.c bpy_rna_array.c bpy_rna_callback.c + bpy_rna_context.c bpy_rna_data.c bpy_rna_driver.c bpy_rna_gizmo.c @@ -101,6 +102,7 @@ set(SRC bpy_rna.h bpy_rna_anim.h bpy_rna_callback.h + bpy_rna_context.h bpy_rna_data.h bpy_rna_driver.h bpy_rna_gizmo.h |