[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19814] branches/blender2.5/blender/source /blender: 2.5
Ton Roosendaal
ton at blender.org
Mon Apr 20 13:39:21 CEST 2009
Revision: 19814
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19814
Author: ton
Date: 2009-04-20 13:39:18 +0200 (Mon, 20 Apr 2009)
Log Message:
-----------
2.5
Fixes:
- HSV picker didn't work. Old option "No Hilite" for buttons made it not
being checked for input anymore. Needs to be on attention list!
- Node editor wasn't drawing buttons correctly. Two things to keep track
off:
- Use wmLoadIdentity(), not glLoadIdentity()
- I've added a wmPushMatrix() and wmPopMatrix() version for correct
wm-compatible push/pop. Only one level for now.
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/editors/interface/interface.c
branches/blender2.5/blender/source/blender/editors/interface/interface_regions.c
branches/blender2.5/blender/source/blender/windowmanager/WM_api.h
branches/blender2.5/blender/source/blender/windowmanager/intern/wm_subwindow.c
Modified: branches/blender2.5/blender/source/blender/editors/interface/interface.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/interface/interface.c 2009-04-20 10:45:25 UTC (rev 19813)
+++ branches/blender2.5/blender/source/blender/editors/interface/interface.c 2009-04-20 11:39:18 UTC (rev 19814)
@@ -641,11 +641,8 @@
ui_but_to_pixelrect(&rect, ar, block, NULL);
/* pixel space for AA widgets */
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glLoadIdentity();
+ wmPushMatrix();
+ wmLoadIdentity();
wmOrtho2(-0.01f, ar->winx-0.01f, -0.01f, ar->winy-0.01f);
@@ -664,10 +661,7 @@
}
/* restore matrix */
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
+ wmPopMatrix();
ui_draw_links(block);
}
Modified: branches/blender2.5/blender/source/blender/editors/interface/interface_regions.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/interface/interface_regions.c 2009-04-20 10:45:25 UTC (rev 19813)
+++ branches/blender2.5/blender/source/blender/editors/interface/interface_regions.c 2009-04-20 11:39:18 UTC (rev 19814)
@@ -1193,10 +1193,8 @@
// the cube intersection
bt= uiDefButF(block, HSVCUBE, retval, "", 0,DPICK+BPICK,FPICK,FPICK, col, 0.0, 0.0, 2, 0, "");
- uiButSetFlag(bt, UI_NO_HILITE);
bt= uiDefButF(block, HSVCUBE, retval, "", 0,0,FPICK,BPICK, col, 0.0, 0.0, 3, 0, "");
- uiButSetFlag(bt, UI_NO_HILITE);
// palette
Modified: branches/blender2.5/blender/source/blender/windowmanager/WM_api.h
===================================================================
--- branches/blender2.5/blender/source/blender/windowmanager/WM_api.h 2009-04-20 10:45:25 UTC (rev 19813)
+++ branches/blender2.5/blender/source/blender/windowmanager/WM_api.h 2009-04-20 11:39:18 UTC (rev 19814)
@@ -183,6 +183,8 @@
void wmGetSingleMatrix (float mat[][4]);
void wmScale (float x, float y, float z);
void wmLoadIdentity (void); /* note: old name clear_view_mat */
+void wmPushMatrix (void); /* one level only */
+void wmPopMatrix (void); /* one level only */
void wmFrustum (float x1, float x2, float y1, float y2, float n, float f);
void wmOrtho (float x1, float x2, float y1, float y2, float n, float f);
Modified: branches/blender2.5/blender/source/blender/windowmanager/intern/wm_subwindow.c
===================================================================
--- branches/blender2.5/blender/source/blender/windowmanager/intern/wm_subwindow.c 2009-04-20 10:45:25 UTC (rev 19813)
+++ branches/blender2.5/blender/source/blender/windowmanager/intern/wm_subwindow.c 2009-04-20 11:39:18 UTC (rev 19814)
@@ -68,6 +68,7 @@
int swinid;
float viewmat[4][4], winmat[4][4];
+ float viewmat1[4][4], winmat1[4][4];
} wmSubWindow;
@@ -306,6 +307,28 @@
glGetFloatv(GL_MODELVIEW_MATRIX, (float *)_curswin->winmat);
}
+void wmPushMatrix(void)
+{
+ if(_curswin==NULL) return;
+
+ Mat4CpyMat4(_curswin->viewmat1, _curswin->viewmat);
+ Mat4CpyMat4(_curswin->winmat1, _curswin->winmat);
+}
+
+void wmPopMatrix(void)
+{
+ if(_curswin==NULL) return;
+
+ Mat4CpyMat4(_curswin->viewmat, _curswin->viewmat1);
+ Mat4CpyMat4(_curswin->winmat, _curswin->winmat1);
+
+ glMatrixMode(GL_PROJECTION);
+ glLoadMatrixf(&_curswin->winmat[0][0]);
+ glMatrixMode(GL_MODELVIEW);
+ glLoadMatrixf(&_curswin->viewmat[0][0]);
+
+}
+
void wmGetSingleMatrix(float mat[][4])
{
if(_curswin)
More information about the Bf-blender-cvs
mailing list