Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/screen/screen_edit.c')
-rw-r--r--source/blender/editors/screen/screen_edit.c41
1 files changed, 33 insertions, 8 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 4f92cec39af..44a7a7c48b3 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -24,6 +24,11 @@
* ***** END GPL LICENSE BLOCK *****
*/
+/** \file blender/editors/screen/screen_edit.c
+ * \ingroup edscr
+ */
+
+
#include <string.h>
#include <math.h>
@@ -222,16 +227,16 @@ void removenotused_scredges(bScreen *sc)
sa= sc->areabase.first;
while(sa) {
se= screen_findedge(sc, sa->v1, sa->v2);
- if(se==0) printf("error: area %d edge 1 doesn't exist\n", a);
+ if(se==NULL) printf("error: area %d edge 1 doesn't exist\n", a);
else se->flag= 1;
se= screen_findedge(sc, sa->v2, sa->v3);
- if(se==0) printf("error: area %d edge 2 doesn't exist\n", a);
+ if(se==NULL) printf("error: area %d edge 2 doesn't exist\n", a);
else se->flag= 1;
se= screen_findedge(sc, sa->v3, sa->v4);
- if(se==0) printf("error: area %d edge 3 doesn't exist\n", a);
+ if(se==NULL) printf("error: area %d edge 3 doesn't exist\n", a);
else se->flag= 1;
se= screen_findedge(sc, sa->v4, sa->v1);
- if(se==0) printf("error: area %d edge 4 doesn't exist\n", a);
+ if(se==NULL) printf("error: area %d edge 4 doesn't exist\n", a);
else se->flag= 1;
sa= sa->next;
a++;
@@ -981,8 +986,9 @@ void ED_screen_do_listen(wmWindow *win, wmNotifier *note)
void ED_screen_draw(wmWindow *win)
{
ScrArea *sa;
- ScrArea *sa1=NULL;
- ScrArea *sa2=NULL;
+ ScrArea *sa1= NULL;
+ ScrArea *sa2= NULL;
+ ScrArea *sa3= NULL;
int dir = -1;
int dira = -1;
@@ -991,6 +997,7 @@ void ED_screen_draw(wmWindow *win)
for(sa= win->screen->areabase.first; sa; sa= sa->next) {
if (sa->flag & AREA_FLAG_DRAWJOINFROM) sa1 = sa;
if (sa->flag & AREA_FLAG_DRAWJOINTO) sa2 = sa;
+ if (sa->flag & (AREA_FLAG_DRAWSPLIT_H|AREA_FLAG_DRAWSPLIT_V)) sa3 = sa;
drawscredge_area(sa, win->sizex, win->sizey, 0);
}
for(sa= win->screen->areabase.first; sa; sa= sa->next)
@@ -1023,7 +1030,25 @@ void ED_screen_draw(wmWindow *win)
scrarea_draw_shape_light(sa1, dira);
}
-// if(G.f & G_DEBUG) printf("draw screen\n");
+ /* splitpoint */
+ if(sa3) {
+ glEnable(GL_BLEND);
+ glColor4ub(255, 255, 255, 100);
+
+ if(sa3->flag & AREA_FLAG_DRAWSPLIT_H) {
+ sdrawline(sa3->totrct.xmin, win->eventstate->y, sa3->totrct.xmax, win->eventstate->y);
+ glColor4ub(0, 0, 0, 100);
+ sdrawline(sa3->totrct.xmin, win->eventstate->y+1, sa3->totrct.xmax, win->eventstate->y+1);
+ }
+ else {
+ sdrawline(win->eventstate->x, sa3->totrct.ymin, win->eventstate->x, sa3->totrct.ymax);
+ glColor4ub(0, 0, 0, 100);
+ sdrawline(win->eventstate->x+1, sa3->totrct.ymin, win->eventstate->x+1, sa3->totrct.ymax);
+ }
+
+ glDisable(GL_BLEND);
+ }
+
win->screen->do_draw= 0;
}
@@ -1470,7 +1495,7 @@ int ED_screen_full_newspace(bContext *C, ScrArea *sa, int type)
bScreen *screen= CTX_wm_screen(C);
ScrArea *newsa= NULL;
- if(!sa || sa->full==0) {
+ if(!sa || sa->full==NULL) {
newsa= ED_screen_full_toggle(C, win, sa);
}