diff options
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/area.c | 2 | ||||
-rw-r--r-- | source/blender/editors/screen/glutil.c | 25 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 10 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 10 |
4 files changed, 39 insertions, 8 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 8f429321fbb..43b917c2186 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -1037,7 +1037,7 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int if (count!=4) { /* let's stop adding regions */ BLI_init_rcti(remainder, 0, 0, 0, 0); - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("region quadsplit failed\n"); } else quad= 1; diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 28fe8caf34b..66abbaecbe7 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -191,6 +191,31 @@ void fdrawbox(float x1, float y1, float x2, float y2) glEnd(); } +void fdrawcheckerboard(float x1, float y1, float x2, float y2) +{ + unsigned char col1[4]= {40, 40, 40}, col2[4]= {50, 50, 50}; + + GLubyte checker_stipple[32*32/8] = { + 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, + 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, + 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, + 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, + 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, + 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, + 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, + 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, + }; + + glColor3ubv(col1); + glRectf(x1, y1, x2, y2); + glColor3ubv(col2); + + glEnable(GL_POLYGON_STIPPLE); + glPolygonStipple(checker_stipple); + glRectf(x1, y1, x2, y2); + glDisable(GL_POLYGON_STIPPLE); +} + void sdrawline(short x1, short y1, short x2, short y2) { short v[2]; diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 9deb64ef60a..1b56feb09d1 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -531,7 +531,7 @@ int screen_area_join(bContext *C, bScreen* scr, ScrArea *sa1, ScrArea *sa2) int dir; dir = area_getorientation(sa1, sa2); - /*printf("dir is : %i \n", dir);*/ + /*printf("dir is : %i\n", dir);*/ if (dir < 0) { if (sa1 ) sa1->flag &= ~AREA_FLAG_DRAWJOINFROM; @@ -1101,7 +1101,9 @@ void ED_screen_refresh(wmWindowManager *wm, wmWindow *win) WM_event_timer_sleep(wm, win, win->screen->animtimer, 0); } - if (G.f & G_DEBUG) printf("set screen\n"); + if (G.debug & G_DEBUG_EVENTS) { + printf("%s: set screen\n", __func__); + } win->screen->do_refresh= 0; win->screen->context= ed_screen_context; @@ -1634,8 +1636,8 @@ ScrArea *ED_screen_full_toggle(bContext *C, wmWindow *win, ScrArea *sa) for (old= sc->areabase.first; old; old= old->next) if (old->full) break; if (old==NULL) { - if (G.f & G_DEBUG) - printf("something wrong in areafullscreen\n"); + if (G.debug & G_DEBUG) + printf("%s: something wrong in areafullscreen\n", __func__); return NULL; } diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index d6a74cc19ce..e427e1e21cf 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -3072,6 +3072,8 @@ static int screen_animation_play_exec(bContext *C, wmOperator *op) static void SCREEN_OT_animation_play(wmOperatorType *ot) { + PropertyRNA *prop; + /* identifiers */ ot->name = "Play Animation"; ot->description = "Play animation"; @@ -3082,8 +3084,10 @@ static void SCREEN_OT_animation_play(wmOperatorType *ot) ot->poll = ED_operator_screenactive_norender; - RNA_def_boolean(ot->srna, "reverse", 0, "Play in Reverse", "Animation is played backwards"); - RNA_def_boolean(ot->srna, "sync", 0, "Sync", "Drop frames to maintain framerate"); + prop = RNA_def_boolean(ot->srna, "reverse", 0, "Play in Reverse", "Animation is played backwards"); + RNA_def_property_flag(prop, PROP_SKIP_SAVE); + prop = RNA_def_boolean(ot->srna, "sync", 0, "Sync", "Drop frames to maintain framerate"); + RNA_def_property_flag(prop, PROP_SKIP_SAVE); } static int screen_animation_cancel_exec(bContext *C, wmOperator *op) @@ -3370,7 +3374,7 @@ static int scene_delete_exec(bContext *C, wmOperator *UNUSED(op)) ED_screen_delete_scene(C, scene); - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("scene delete %p\n", scene); WM_event_add_notifier(C, NC_SCENE|NA_REMOVED, scene); |