Blender  V2.59
Classes | Defines | Functions | Variables
bpy_interface.c File Reference
#include <Python.h>
#include "MEM_guardedalloc.h"
#include "RNA_types.h"
#include "bpy.h"
#include "bpy_rna.h"
#include "bpy_util.h"
#include "bpy_traceback.h"
#include "bpy_intern_string.h"
#include "DNA_space_types.h"
#include "DNA_text_types.h"
#include "BLI_path_util.h"
#include "BLI_math_base.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "BKE_text.h"
#include "BKE_font.h"
#include "BKE_main.h"
#include "BKE_global.h"
#include "BPY_extern.h"
#include "../generic/bpy_internal_import.h"
#include "../generic/py_capi_utils.h"
#include "../generic/bgl.h"
#include "../generic/blf_py_api.h"
#include "../generic/noise_py_api.h"
#include "../mathutils/mathutils.h"

Go to the source code of this file.

Classes

struct  PyModuleObject

Defines

#define PYMODULE_CLEAR_WORKAROUND

Functions

void bpy_context_set (bContext *C, PyGILState_STATE *gilstate)
void bpy_context_clear (bContext *UNUSED(C), PyGILState_STATE *gilstate)
void BPY_text_free_code (Text *text)
void BPY_modules_update (bContext *C)
void BPY_context_set (bContext *C)
PyObject * AUD_initPython (void)
void BPY_python_start (int argc, const char **argv)
void BPY_python_end (void)
static void python_script_error_jump_text (struct Text *text)
static int python_script_exec (bContext *C, const char *fn, struct Text *text, struct ReportList *reports, const short do_jump)
int BPY_filepath_exec (bContext *C, const char *filepath, struct ReportList *reports)
int BPY_text_exec (bContext *C, struct Text *text, struct ReportList *reports, const short do_jump)
void BPY_DECREF (void *pyob_ptr)
int BPY_button_exec (bContext *C, const char *expr, double *value, const short verbose)
int BPY_string_exec (bContext *C, const char *expr)
void BPY_modules_load_user (bContext *C)
int BPY_context_member_get (bContext *C, const char *member, bContextDataResult *result)

Variables

static int py_call_level = 0
BPy_StructRNAbpy_context_module = NULL
static struct _inittab bpy_internal_modules []

Detailed Description

Definition in file bpy_interface.c.


Define Documentation

#define PYMODULE_CLEAR_WORKAROUND

Definition at line 298 of file bpy_interface.c.


Function Documentation

PyObject* AUD_initPython ( void  )
int BPY_button_exec ( bContext C,
const char *  expr,
double *  value,
const short  verbose 
)
void bpy_context_clear ( bContext UNUSEDC,
PyGILState_STATE *  gilstate 
)
int BPY_context_member_get ( bContext C,
const char *  member,
bContextDataResult result 
)
void bpy_context_set ( bContext C,
PyGILState_STATE *  gilstate 
)
void BPY_context_set ( bContext C)

Definition at line 168 of file bpy_interface.c.

References BPy_SetContext().

Referenced by WM_init().

void BPY_DECREF ( void *  pyob_ptr)

Definition at line 431 of file bpy_interface.c.

Referenced by fcurve_free_driver(), and WM_operator_free().

int BPY_filepath_exec ( bContext C,
const char *  filepath,
struct ReportList reports 
)

Definition at line 420 of file bpy_interface.c.

References FALSE, NULL, and python_script_exec().

Referenced by run_pyfile_exec(), and run_python().

void BPY_modules_load_user ( bContext C)
void BPY_modules_update ( bContext C)
void BPY_python_end ( void  )

Definition at line 249 of file bpy_interface.c.

References bpy_intern_string_exit(), PIL_check_seconds_timer(), and pyrna_free_types().

Referenced by WM_exit().

void BPY_python_start ( int  argc,
const char **  argv 
)
int BPY_string_exec ( bContext C,
const char *  expr 
)
int BPY_text_exec ( bContext C,
struct Text text,
struct ReportList reports,
const short  do_jump 
)

Definition at line 426 of file bpy_interface.c.

References NULL, and python_script_exec().

Referenced by run_script().

void BPY_text_free_code ( Text text)

Definition at line 147 of file bpy_interface.c.

References Text::compiled, and NULL.

Referenced by free_text(), python_script_exec(), reload_exec(), and txt_make_dirty().

static void python_script_error_jump_text ( struct Text text) [static]

Definition at line 285 of file bpy_interface.c.

References FALSE, Text::id, ID::name, python_script_error_jump(), TRUE, and txt_move_to().

Referenced by python_script_exec().

static int python_script_exec ( bContext C,
const char *  fn,
struct Text text,
struct ReportList reports,
const short  do_jump 
) [static]

Variable Documentation

Definition at line 78 of file bpy_interface.c.

Referenced by BPy_init_modules().

struct _inittab bpy_internal_modules[] [static]
Initial value:
 {
        {(char *)"noise", BPyInit_noise},
        {(char *)"mathutils", PyInit_mathutils},

        {(char *)"bgl", BPyInit_bgl},
        {(char *)"blf", BPyInit_blf},



        {NULL, NULL}
}

Definition at line 176 of file bpy_interface.c.

int py_call_level = 0 [static]

Definition at line 77 of file bpy_interface.c.

Referenced by bpy_context_clear(), and bpy_context_set().