40 if (region !=
nullptr) {
56 ot->name =
"Run Python File";
57 ot->description =
"Run Python file";
58 ot->idname =
"SCRIPT_OT_python_file_run";
71static bool script_test_modal_operators(
bContext *
C)
78 if (handler->
op !=
nullptr) {
80 if (
ot->rna_ext.srna) {
98 if (script_test_modal_operators(
C)) {
112 const char *imports[] = {
"bpy",
nullptr};
116 " bpy.utils.load_scripts(reload_scripts=True)\n"
118 "bpy.app.timers.register(fn)");
122 const char *imports[] = {
"bpy",
nullptr};
140 ot->name =
"Reload Scripts";
141 ot->description =
"Reload scripts";
142 ot->idname =
"SCRIPT_OT_reload";
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)
std::string RNA_string_get(PointerRNA *ptr, const char *name)
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 wmOperatorStatus script_reload_exec(bContext *C, wmOperator *op)
static wmOperatorStatus run_pyfile_exec(bContext *C, wmOperator *op)
void SCRIPT_OT_python_file_run(wmOperatorType *ot)
struct ReportList * reports
struct wmOperatorType * type
void WM_cursor_wait(bool val)