diff options
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/area.c | 22 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 13 |
2 files changed, 23 insertions, 12 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 7e79849ba40..9d6d663df5c 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -84,19 +84,19 @@ static void region_draw_emboss(ARegion *ar, rcti *scirct) glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); /* right */ - glColor4ub(0,0,0, 50); + glColor4ub(0,0,0, 30); sdrawline(rect.xmax, rect.ymin, rect.xmax, rect.ymax); /* bottom */ - glColor4ub(0,0,0, 80); + glColor4ub(0,0,0, 30); sdrawline(rect.xmin, rect.ymin, rect.xmax, rect.ymin); /* top */ - glColor4ub(255,255,255, 60); + glColor4ub(255,255,255, 30); sdrawline(rect.xmin, rect.ymax, rect.xmax, rect.ymax); /* left */ - glColor4ub(255,255,255, 50); + glColor4ub(255,255,255, 30); sdrawline(rect.xmin, rect.ymin, rect.xmin, rect.ymax); glDisable( GL_BLEND ); @@ -414,6 +414,9 @@ void ED_region_do_draw(bContext *C, ARegion *ar) /* note; this sets state, so we can use wmOrtho and friends */ wmSubWindowScissorSet(win, ar->swinid, &ar->drawrct); + + ar->do_draw= 0; + memset(&ar->drawrct, 0, sizeof(ar->drawrct)); UI_SetTheme(sa?sa->spacetype:0, ar->type?ar->type->regionid:0); @@ -429,18 +432,15 @@ void ED_region_do_draw(bContext *C, ARegion *ar) at->draw(C, ar); } + /* XXX test: add convention to end regions always in pixel space, for drawing of borders/gestures etc */ + ED_region_pixelspace(ar); + ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST_PIXEL); uiFreeInactiveBlocks(C, &ar->uiblocks); - + if(sa) region_draw_emboss(ar, &winrct); - - /* XXX test: add convention to end regions always in pixel space, for drawing of borders/gestures etc */ - ED_region_pixelspace(ar); - - ar->do_draw= 0; - memset(&ar->drawrct, 0, sizeof(ar->drawrct)); } /* ********************************** diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 0a7e3a2763a..e86dd8dbde3 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -192,7 +192,7 @@ int ED_operator_animview_active(bContext *C) { if(ED_operator_areaactive(C)) { SpaceLink *sl= (SpaceLink *)CTX_wm_space_data(C); - if (sl && (ELEM6(sl->spacetype, SPACE_SEQ, SPACE_SOUND, SPACE_ACTION, SPACE_NLA, SPACE_IPO, SPACE_TIME))) + if (sl && (ELEM5(sl->spacetype, SPACE_SEQ, SPACE_ACTION, SPACE_NLA, SPACE_IPO, SPACE_TIME))) return TRUE; } @@ -406,6 +406,17 @@ int ED_operator_editcurve(bContext *C) return 0; } +int ED_operator_editcurve_3d(bContext *C) +{ + Object *obedit= CTX_data_edit_object(C); + if(obedit && obedit->type==OB_CURVE) { + Curve *cu= (Curve *)obedit->data; + + return (cu->flag&CU_3D) && (NULL != cu->editnurb); + } + return 0; +} + int ED_operator_editsurf(bContext *C) { Object *obedit= CTX_data_edit_object(C); |