Blender V5.3
bpy_rna_context.cc File Reference
#include <Python.h>
#include "BLI_listbase.hh"
#include "BLI_utildefines.hh"
#include "BKE_context.hh"
#include "BKE_main.hh"
#include "BKE_screen.hh"
#include "BKE_workspace.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "bpy_rna_context.hh"
#include "../generic/py_capi_utils.hh"
#include "../generic/python_compat.hh"
#include "RNA_access.hh"
#include "RNA_prototypes.hh"
#include "bpy_rna.hh"

Go to the source code of this file.

Classes

struct  blender::ContextStore
struct  blender::BPyContextTempOverride

Namespaces

namespace  blender
 BMesh Iterators.

Functions

Private Utility Functions
static void blender::bpy_rna_context_temp_set_screen_for_window (bContext *C, wmWindow *win, bScreen *screen)
static bool blender::wm_check_screen_switch_supported (const bScreen *screen)
static bool blender::wm_check_window_exists (const Main *bmain, const wmWindow *win)
static bool blender::wm_check_screen_exists (const Main *bmain, const bScreen *screen)
static bool blender::wm_check_area_exists (const wmWindow *win, const bScreen *screen, const ScrArea *area)
static bool blender::wm_check_region_exists (const bScreen *screen, const ScrArea *area, const ARegion *region)
Context Temporary Override Method
static PyObject * blender::bpy_context_temp_override_extract_known_args (const char *const *kwds_static, PyObject *kwds)
 blender::PyDoc_STRVAR (bpy_context_temp_override_doc, ".. method:: temp_override(*, window=None, screen=None, area=None, region=None, **keywords)\n" "\n" " Context manager to temporarily override members in the context.\n" "\n" " :param window: Window override or None.\n" " :type window: :class:`bpy.types.Window` | None\n" " :param screen: Screen override or None.\n" "\n" " .. note:: Switching to or away from full-screen areas & temporary screens " "isn't supported. Passing in these screens will raise an exception, " "actions that leave the context such screens won't restore the prior screen.\n" "\n" " .. note:: Changing the screen has wider implications " "than other arguments as it will also change the works-space " "and potentially the scene (when pinned).\n" "\n" " :type screen: :class:`bpy.types.Screen` | None\n" " :param area: Area override or None.\n" " :type area: :class:`bpy.types.Area` | None\n" " :param region: Region override or None.\n" " :type region: :class:`bpy.types.Region` | None\n" " :param keywords: Additional keywords override context members.\n" " :return: The context manager.\n" " :rtype: :class:`bpy.types.ContextTempOverride`\n")
static PyObject * blender::bpy_context_temp_override (PyObject *self, PyObject *args, PyObject *kwds)

Temporary Context Override (Python Context Manager)

static PyMethodDef blender::bpy_rna_context_temp_override_methods []
static PyTypeObject blender::BPyContextTempOverride_Type
static void blender::bpy_rna_context_temp_override_dealloc (BPyContextTempOverride *self)
static int blender::bpy_rna_context_temp_override_traverse (BPyContextTempOverride *self, visitproc visit, void *arg)
static int blender::bpy_rna_context_temp_override_clear (BPyContextTempOverride *self)
static bool blender::bpy_rna_context_temp_override_enter_ok_or_error (const BPyContextTempOverride *self, const Main *bmain, const wmWindow *win, const bScreen *screen, const ScrArea *area, const ARegion *region)
static PyObject * blender::bpy_rna_context_temp_override_enter (BPyContextTempOverride *self)
static PyObject * blender::bpy_rna_context_temp_override_exit (BPyContextTempOverride *self, PyObject *)
 blender::PyDoc_STRVAR (bpy_rna_context_temp_override_logging_set_doc, ".. method:: logging_set(enable, *, hide_missing=False)\n" "\n" " Set context member logging options for this temporary override.\n" "\n" " :param enable: Enable logging of context member access.\n" " :type enable: bool\n" " :param hide_missing: When true, suppress logging access to members that\n" " are not available in the current context.\n" " :type hide_missing: bool\n")
static PyObject * blender::bpy_rna_context_temp_override_logging_set (BPyContextTempOverride *self, PyObject *args, PyObject *kwds)

Public Type Definition

PyMethodDef blender::BPY_rna_context_temp_override_method_def
void blender::bpy_rna_context_types_init (PyObject *bpy_types)

Detailed Description

This file adds some helper methods to the context, that cannot fit well in RNA itself.

Definition in file bpy_rna_context.cc.