Blender  V2.93
Classes | Functions
BPY_extern_run.h File Reference
#include "BLI_sys_types.h"

Go to the source code of this file.

Classes

struct  BPy_RunErrInfo
 

Functions

bool BPY_run_filepath (struct bContext *C, const char *filepath, struct ReportList *reports)
 
bool BPY_run_text (struct bContext *C, struct Text *text, struct ReportList *reports, const bool do_jump)
 
bool BPY_run_string_exec (struct bContext *C, const char *imports[], const char *expr)
 
bool BPY_run_string_eval (struct bContext *C, const char *imports[], const char *expr)
 
bool BPY_run_string_as_number (struct bContext *C, const char *imports[], const char *expr, struct BPy_RunErrInfo *err_info, double *r_value)
 
bool BPY_run_string_as_intptr (struct bContext *C, const char *imports[], const char *expr, struct BPy_RunErrInfo *err_info, intptr_t *r_value)
 
bool BPY_run_string_as_string_and_size (struct bContext *C, const char *imports[], const char *expr, struct BPy_RunErrInfo *err_info, char **r_value, size_t *r_value_size)
 
bool BPY_run_string_as_string (struct bContext *C, const char *imports[], const char *expr, struct BPy_RunErrInfo *err_info, char **r_value)
 

Function Documentation

◆ BPY_run_filepath()

bool BPY_run_filepath ( struct bContext C,
const char *  filepath,
struct ReportList reports 
)

◆ BPY_run_string_as_intptr()

bool BPY_run_string_as_intptr ( bContext C,
const char *  imports[],
const char *  expr,
struct BPy_RunErrInfo err_info,
intptr_t r_value 
)

Support both int and pointers.

Returns
success

Definition at line 413 of file bpy_interface_run.c.

References BLI_assert, bpy_context_clear(), bpy_context_set(), C, PyC_RunString_AsIntPtr(), and run_string_handle_error().

Referenced by ui_tooltip_data_from_tool().

◆ BPY_run_string_as_number()

bool BPY_run_string_as_number ( bContext C,
const char *  imports[],
const char *  expr,
struct BPy_RunErrInfo err_info,
double r_value 
)

◆ BPY_run_string_as_string()

bool BPY_run_string_as_string ( struct bContext C,
const char *  imports[],
const char *  expr,
struct BPy_RunErrInfo err_info,
char **  r_value 
)

Definition at line 398 of file bpy_interface_run.c.

References BPY_run_string_as_string_and_size(), and C.

Referenced by ui_but_user_menu_add(), and ui_tooltip_data_from_tool().

◆ BPY_run_string_as_string_and_size()

bool BPY_run_string_as_string_and_size ( bContext C,
const char *  imports[],
const char *  expr,
struct BPy_RunErrInfo err_info,
char **  r_value,
size_t *  r_value_size 
)

◆ BPY_run_string_eval()

bool BPY_run_string_eval ( bContext C,
const char *  imports[],
const char *  expr 
)

◆ BPY_run_string_exec()

bool BPY_run_string_exec ( bContext C,
const char *  imports[],
const char *  expr 
)

Run an entire script, matches: exec(compile(..., "exec"))

Definition at line 284 of file bpy_interface_run.c.

References bpy_run_string_impl(), and C.

Referenced by arg_handle_addons_set(), arg_handle_python_expr_run(), script_reload_exec(), and wm_file_read_post().

◆ BPY_run_text()

bool BPY_run_text ( struct bContext C,
struct Text text,
struct ReportList reports,
const bool  do_jump 
)