diff options
Diffstat (limited to 'source/blender/editors/space_script')
4 files changed, 7 insertions, 26 deletions
diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c index 5a761d1cabf..ee8dcf0ca9a 100644 --- a/source/blender/editors/space_script/script_edit.c +++ b/source/blender/editors/space_script/script_edit.c @@ -145,23 +145,3 @@ void SCRIPT_OT_reload(wmOperatorType *ot) /* api callbacks */ ot->exec = script_reload_exec; } - -static int script_autoexec_warn_clear_exec(bContext *UNUSED(C), wmOperator *UNUSED(op)) -{ - G.f |= G_SCRIPT_AUTOEXEC_FAIL_QUIET; - return OPERATOR_FINISHED; -} - -void SCRIPT_OT_autoexec_warn_clear(wmOperatorType *ot) -{ - /* identifiers */ - ot->name = "Continue Untrusted"; - ot->description = "Ignore autoexec warning"; - ot->idname = "SCRIPT_OT_autoexec_warn_clear"; - - /* flags */ - ot->flag = OPTYPE_INTERNAL; - - /* api callbacks */ - ot->exec = script_autoexec_warn_clear_exec; -} diff --git a/source/blender/editors/space_script/script_intern.h b/source/blender/editors/space_script/script_intern.h index 0e0936cf082..649992fec4f 100644 --- a/source/blender/editors/space_script/script_intern.h +++ b/source/blender/editors/space_script/script_intern.h @@ -40,6 +40,5 @@ void script_keymap(struct wmKeyConfig *keyconf); /* script_edit.c */ void SCRIPT_OT_reload(struct wmOperatorType *ot); void SCRIPT_OT_python_file_run(struct wmOperatorType *ot); -void SCRIPT_OT_autoexec_warn_clear(struct wmOperatorType *ot); #endif /* __SCRIPT_INTERN_H__ */ diff --git a/source/blender/editors/space_script/script_ops.c b/source/blender/editors/space_script/script_ops.c index 41c07596a3b..90eb38db7f7 100644 --- a/source/blender/editors/space_script/script_ops.c +++ b/source/blender/editors/space_script/script_ops.c @@ -44,7 +44,6 @@ void script_operatortypes(void) { WM_operatortype_append(SCRIPT_OT_python_file_run); WM_operatortype_append(SCRIPT_OT_reload); - WM_operatortype_append(SCRIPT_OT_autoexec_warn_clear); } void script_keymap(wmKeyConfig *UNUSED(keyconf)) diff --git a/source/blender/editors/space_script/space_script.c b/source/blender/editors/space_script/space_script.c index 2adfcc521f5..65c489e8409 100644 --- a/source/blender/editors/space_script/space_script.c +++ b/source/blender/editors/space_script/space_script.c @@ -55,6 +55,7 @@ #endif #include "script_intern.h" // own include +#include "GPU_framebuffer.h" //static script_run_python(char *funcname, ) @@ -62,7 +63,7 @@ /* ******************** default callbacks for script space ***************** */ -static SpaceLink *script_new(const bContext *UNUSED(C)) +static SpaceLink *script_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) { ARegion *ar; SpaceScript *sscript; @@ -76,7 +77,7 @@ static SpaceLink *script_new(const bContext *UNUSED(C)) BLI_addtail(&sscript->regionbase, ar); ar->regiontype = RGN_TYPE_HEADER; - ar->alignment = RGN_ALIGN_BOTTOM; + ar->alignment = RGN_ALIGN_TOP; /* main region */ ar = MEM_callocN(sizeof(ARegion), "main region for script"); @@ -144,7 +145,7 @@ static void script_main_region_draw(const bContext *C, ARegion *ar) /* clear and setup matrix */ UI_ThemeClearColor(TH_BACK); - glClear(GL_COLOR_BUFFER_BIT); + GPU_clear(GPU_COLOR_BIT); UI_view2d_view_ortho(v2d); @@ -176,7 +177,9 @@ static void script_header_region_draw(const bContext *C, ARegion *ar) ED_region_header(C, ar); } -static void script_main_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *UNUSED(ar), wmNotifier *UNUSED(wmn)) +static void script_main_region_listener( + wmWindow *UNUSED(win), ScrArea *UNUSED(sa), ARegion *UNUSED(ar), + wmNotifier *UNUSED(wmn), const Scene *UNUSED(scene)) { /* context changes */ // XXX - Todo, need the ScriptSpace accessible to get the python script to run. |