Blender
V3.3
|
#include <Python.h>
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "WM_api.h"
#include "WM_types.h"
#include "bpy_rna_context.h"
#include "RNA_access.h"
#include "RNA_prototypes.h"
#include "bpy_rna.h"
Go to the source code of this file.
Classes | |
struct | ContextStore |
struct | BPyContextTempOverride |
Functions | |
void | bpy_rna_context_types_init (void) |
Context Temporary Override Method | |
static PyObject * | bpy_context_temp_override_extract_known_args (const char *const *kwds_static, PyObject *kwds) |
PyDoc_STRVAR (bpy_context_temp_override_doc, ".. method:: temp_override(window, area, region, **keywords)\n" "\n" " Context manager to temporarily override members in the context.\n" "\n" " :arg window: Window override or None.\n" " :type window: :class:`bpy.types.Window`\n" " :arg area: Area override or None.\n" " :type area: :class:`bpy.types.Area`\n" " :arg region: Region override or None.\n" " :type region: :class:`bpy.types.Region`\n" " :arg keywords: Additional keywords override context members.\n" " :return: The context manager .\n" " :rtype: context manager\n") | |
static PyObject * | bpy_context_temp_override (PyObject *self, PyObject *args, PyObject *kwds) |
Variables | |
PyMethodDef | BPY_rna_context_temp_override_method_def |
Temporary Context Override (Python Context Manager) | |
typedef struct ContextStore | ContextStore |
typedef struct BPyContextTempOverride | BPyContextTempOverride |
static PyMethodDef | bpy_rna_context_temp_override__tp_methods [] |
static PyTypeObject | BPyContextTempOverride_Type |
static void | bpy_rna_context_temp_override__tp_dealloc (BPyContextTempOverride *self) |
static PyObject * | bpy_rna_context_temp_override_enter (BPyContextTempOverride *self) |
static PyObject * | bpy_rna_context_temp_override_exit (BPyContextTempOverride *self, PyObject *UNUSED(args)) |
This file adds some helper methods to the context, that cannot fit well in RNA itself.
Definition in file bpy_rna_context.c.
typedef struct BPyContextTempOverride BPyContextTempOverride |
typedef struct ContextStore ContextStore |
|
static |
Definition at line 210 of file bpy_rna_context.c.
References blender::compositor::area(), ContextStore::area, ContextStore::area_is_set, bpy_context_temp_override_extract_known_args(), BPyContextTempOverride_Type, C, CTX_py_dict_get(), PointerRNA::data, NULL, params, pyrna_struct_as_ptr(), pyrna_struct_as_ptr_or_null_parse(), ContextStore::region, ContextStore::region_is_set, ret, ContextStore::win, and ContextStore::win_is_set.
|
static |
Definition at line 177 of file bpy_rna_context.c.
References BLI_assert_unreachable.
Referenced by bpy_context_temp_override().
|
static |
Definition at line 58 of file bpy_rna_context.c.
|
static |
Definition at line 63 of file bpy_rna_context.c.
References blender::compositor::area(), bScreen::areabase, BLI_findindex(), C, CTX_py_state_push(), CTX_wm_area(), CTX_wm_area_set(), CTX_wm_region(), CTX_wm_region_set(), CTX_wm_window(), CTX_wm_window_set(), NULL, bScreen::regionbase, self, and WM_window_get_active_screen().
|
static |
Definition at line 118 of file bpy_rna_context.c.
References BLI_findindex(), C, CTX_py_dict_get(), CTX_py_state_pop(), CTX_wm_area_set(), CTX_wm_manager(), CTX_wm_region_set(), CTX_wm_window_set(), NULL, self, and wmWindowManager::windows.
Definition at line 313 of file bpy_rna_context.c.
References BLI_assert_unreachable, and BPyContextTempOverride_Type.
Referenced by BPY_rna_types_extend_capi().
PyDoc_STRVAR | ( | bpy_context_temp_override_doc | , |
".. method:: temp_override(window, area, region, **keywords)\n" "\n" " Context manager to temporarily override members in the context.\n" "\n" " :arg window: Window override or None.\n" " :type window: :class:`bpy.types.Window`\n" " :arg area: Area override or None.\n" " :type area: :class:`bpy.types.Area`\n" " :arg region: Region override or None.\n" " :type region: :class:`bpy.types.Region`\n" " :arg keywords: Additional keywords override context members.\n" " :return: The context manager .\n" " :rtype: context manager\n" | |||
) |
|
static |
Definition at line 157 of file bpy_rna_context.c.
PyMethodDef BPY_rna_context_temp_override_method_def |
Definition at line 306 of file bpy_rna_context.c.
Referenced by BPY_rna_types_extend_capi().
|
static |
Definition at line 163 of file bpy_rna_context.c.
Referenced by bpy_context_temp_override(), and bpy_rna_context_types_init().