Blender V5.3
bpy_interface.cc File Reference
#include <Python.h>
#include <frameobject.h>
#include <optional>
#include "../generic/python_compat.hh"
#include "CLG_log.h"
#include "BLI_path_utils.hh"
#include "BLI_string.hh"
#include "BLI_string_utf8.hh"
#include "BLI_threads.hh"
#include "BLI_utildefines.hh"
#include "BLT_translation.hh"
#include "RNA_types.hh"
#include "bpy.hh"
#include "bpy_audaspace.hh"
#include "bpy_capi_utils.hh"
#include "bpy_intern_string.hh"
#include "bpy_path.hh"
#include "bpy_props.hh"
#include "bpy_rna.hh"
#include "bpy_app_translations.hh"
#include "DNA_freestyle_types.h"
#include "DNA_layer_types.h"
#include "DNA_scene_types.h"
#include "DNA_text_types.h"
#include "BKE_appdir.hh"
#include "BKE_context.hh"
#include "BKE_global.hh"
#include "BKE_main.hh"
#include "BKE_text.h"
#include "BPY_extern.hh"
#include "BPY_extern_python.hh"
#include "BPY_extern_run.hh"
#include "../generic/py_capi_utils.hh"
#include "../bmesh/bmesh_py_api.hh"
#include "../generic/bl_math_py_api.hh"
#include "../generic/blf_py_api.hh"
#include "../generic/idprop_py_api.hh"
#include "../generic/imbuf_py_api.hh"
#include "../gpu/gpu_py_api.hh"
#include "../mathutils/mathutils.hh"

Go to the source code of this file.

Namespaces

namespace  blender
 BMesh Iterators.

Functions

 blender::CLG_LOGREF_DECLARE_GLOBAL (BPY_LOG_INTERFACE, "bpy.interface")
 blender::CLG_LOGREF_DECLARE_GLOBAL (BPY_LOG_RNA, "bpy.rna")
void blender::BPY_context_update (bContext *C)
static bool blender::bpy_context_set_ex (bContext *C, PyGILState_STATE *gilstate, const bool allow_null_context)
bool blender::bpy_context_set (struct bContext *C, PyGILState_STATE *gilstate) ATTR_NONNULL(1)
bool blender::bpy_context_set_allow_null (struct bContext *C, PyGILState_STATE *gilstate)
void blender::bpy_context_clear (struct bContext *C, const PyGILState_STATE *gilstate)
static void blender::bpy_context_end (bContext *C)
void blender::BPY_context_dict_clear_members_array (void **dict_p, void *dict_orig, const char *context_members[], uint context_members_len)
void blender::BPY_text_free_code (Text *text)
void blender::BPY_modules_update ()
struct bContext * blender::BPY_context_get ()
void blender::BPY_context_set (bContext *C)
static void blender::pystatus_exit_on_error (const PyStatus &status)
void blender::BPY_python_start (bContext *C, int argc, const char **argv)
void blender::BPY_python_end (bool do_python_exit)
void blender::BPY_python_reset (bContext *C)
void blender::BPY_python_use_system_env ()
void blender::BPY_python_use_user_env ()
bool blender::BPY_python_use_system_env_get ()
void blender::BPY_python_backtrace (FILE *fp)
void blender::BPY_DECREF (void *pyob_ptr)
void blender::BPY_DECREF_RNA_INVALIDATE (void *pyob_ptr)
void blender::BPY_modules_load_user (bContext *C)
static void blender::bpy_context_log_member_error (const bContext *C, const char *message)
bool blender::BPY_context_member_get (bContext *C, const char *member, bContextDataResult *result)
std::optional< std::string > blender::BPY_python_current_file_and_line ()
bool blender::BPY_string_is_keyword (const char *str)
Character Classification

Define text.cc functions here (declared in BKE_text.h), This could be removed if Blender gets its own unicode library.

int blender::text_check_identifier_unicode (unsigned int ch)
int blender::text_check_identifier_nodigit_unicode (unsigned int ch)

Variables

CLG_LogRef * blender::BKE_LOG_CONTEXT
static int blender::py_call_level = 0
static bool blender::py_use_system_env = false
static bool blender::py_use_user_env = false
static _inittab blender::bpy_internal_modules []

Detailed Description

This file deals with embedding the python interpreter within blender, starting and stopping python and exposing blender/python modules so they can be accesses from scripts.

Definition in file bpy_interface.cc.