42 if (region !=
nullptr) {
58 ot->
name =
"Run Python File";
60 ot->
idname =
"SCRIPT_OT_python_file_run";
73static bool script_test_modal_operators(
bContext *C)
80 if (handler->
op !=
nullptr) {
100 if (script_test_modal_operators(C)) {
114 const char *imports[] = {
"bpy",
nullptr};
118 " bpy.utils.load_scripts(reload_scripts=True)\n"
120 "bpy.app.timers.register(fn)");
124 const char *imports[] = {
"bpy",
nullptr};
142 ot->
name =
"Reload Scripts";
ARegion * CTX_wm_region(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
void BKE_report(ReportList *reports, eReportType type, const char *message)
#define LISTBASE_FOREACH(type, var, list)
#define BLT_I18NCONTEXT_EDITOR_FILEBROWSER
bool BPY_run_filepath(bContext *C, const char *filepath, ReportList *reports) ATTR_NONNULL(1
bool BPY_run_string_eval(bContext *C, const char *imports[], const char *expr)
bool BPY_run_string_exec(bContext *C, const char *imports[], const char *expr)
void ED_region_tag_redraw(ARegion *region)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
PropertyRNA * RNA_def_string_file_path(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void SCRIPT_OT_reload(wmOperatorType *ot)
static int script_reload_exec(bContext *C, wmOperator *op)
static int run_pyfile_exec(bContext *C, wmOperator *op)
void SCRIPT_OT_python_file_run(wmOperatorType *ot)
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
struct wmOperatorType * type
void WM_cursor_wait(bool val)