[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14734] branches/apricot/source/blender: apricot request layer colors for active/used/empty color channels, colors are not that nice at the moment, so lucky we have artists!
Campbell Barton
ideasman42 at gmail.com
Wed May 7 23:21:48 CEST 2008
Revision: 14734
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14734
Author: campbellbarton
Date: 2008-05-07 23:21:48 +0200 (Wed, 07 May 2008)
Log Message:
-----------
apricot request layer colors for active/used/empty color channels, colors are not that nice at the moment, so lucky we have artists!
Modified Paths:
--------------
branches/apricot/source/blender/makesdna/DNA_view3d_types.h
branches/apricot/source/blender/src/buttons_editing.c
branches/apricot/source/blender/src/drawview.c
branches/apricot/source/blender/src/header_view3d.c
Modified: branches/apricot/source/blender/makesdna/DNA_view3d_types.h
===================================================================
--- branches/apricot/source/blender/makesdna/DNA_view3d_types.h 2008-05-07 21:21:15 UTC (rev 14733)
+++ branches/apricot/source/blender/makesdna/DNA_view3d_types.h 2008-05-07 21:21:48 UTC (rev 14734)
@@ -79,7 +79,8 @@
float winmat1[4][4]; // persp(1) storage, for swap matrices
float viewmat1[4][4];
- float viewquat[4], dist, zfac, pad0; /* zfac is initgrabz() result */
+ float viewquat[4], dist, zfac; /* zfac is initgrabz() result */
+ int lay_used; /* used while drawing */
short persp;
short view;
Modified: branches/apricot/source/blender/src/buttons_editing.c
===================================================================
--- branches/apricot/source/blender/src/buttons_editing.c 2008-05-07 21:21:15 UTC (rev 14733)
+++ branches/apricot/source/blender/src/buttons_editing.c 2008-05-07 21:21:48 UTC (rev 14734)
@@ -5070,6 +5070,10 @@
uiBlockEndAlign(block);
+ uiDefButBitS(block, TOG, B_MESH_X_MIRROR, B_DIFF, "X-axis mirror",1125,0,150,19, &G.scene->toolsettings->editbutflag, 0, 0, 0, 0, "While using transforms, mirrors the transformation");
+ uiDefButC(block, MENU, REDRAWBUTSEDIT, "Edge Alt-Select Mode%t|Loop Select%x0|Tag Edges%x1",1125,88,150,19, &G.scene->toolsettings->edge_mode, 0, 0, 0, 0, "Operation to use when Alt+Right clicking on edges");
+
+
uiBlockBeginAlign(block);
uiDefButBitI(block, TOG, G_ALLEDGES, 0, "All Edges", 1125, 22,150,19, &G.f, 0, 0, 0, 0, "Displays all edges in object mode without optimization");
uiDefButBitS(block, TOG, B_MESH_X_MIRROR, B_DIFF, "X-axis mirror",1125,0,150,19, &G.scene->toolsettings->editbutflag, 0, 0, 0, 0, "While using transforms, mirrors the transformation");
Modified: branches/apricot/source/blender/src/drawview.c
===================================================================
--- branches/apricot/source/blender/src/drawview.c 2008-05-07 21:21:15 UTC (rev 14733)
+++ branches/apricot/source/blender/src/drawview.c 2008-05-07 21:21:48 UTC (rev 14734)
@@ -3007,9 +3007,12 @@
for(SETLOOPER(G.scene->set, base))
object_handle_update(base->object); // bke_object.h
}
-
- for(base= G.scene->base.first; base; base= base->next)
+
+ v3d->lay_used = 0;
+ for(base= G.scene->base.first; base; base= base->next) {
object_handle_update(base->object); // bke_object.h
+ v3d->lay_used |= base->lay;
+ }
setwinmatrixview3d(sa->winx, sa->winy, NULL); /* 0= no pick rect */
setviewmatrixview3d(); /* note: calls where_is_object for camera... */
Modified: branches/apricot/source/blender/src/header_view3d.c
===================================================================
--- branches/apricot/source/blender/src/header_view3d.c 2008-05-07 21:21:15 UTC (rev 14733)
+++ branches/apricot/source/blender/src/header_view3d.c 2008-05-07 21:21:48 UTC (rev 14734)
@@ -5651,18 +5651,40 @@
/* LAYERS */
if(G.obedit==NULL && G.vd->localview==0) {
uiBlockBeginAlign(block);
- for(a=0; a<5; a++)
+ for(a=0; a<5; a++) {
+ if (ob && ob->lay & 1<<a )
+ uiBlockSetCol(block, TH_ACTIVE);
+ else if ((G.vd->lay_used & 1<<a)==0)
+ uiBlockSetCol(block, BUTDBLUE);
uiDefButBitI(block, TOG, 1<<a, B_LAY+a, "", (short)(xco+a*(XIC/2)), (short)(YIC/2),(short)(XIC/2),(short)(YIC/2), &(G.vd->lay), 0, 0, 0, 0, "Toggles Layer visibility (Num, Shift Num)");
- for(a=0; a<5; a++)
+ uiBlockSetCol(block, TH_AUTO);
+ }
+ for(a=0; a<5; a++) {
+ if (ob && ob->lay & 1<<(a+10) )
+ uiBlockSetCol(block, TH_ACTIVE);
+ else if ((G.vd->lay_used & 1<<(a+10))==0)
+ uiBlockSetCol(block, BUTDBLUE);
uiDefButBitI(block, TOG, 1<<(a+10), B_LAY+10+a, "",(short)(xco+a*(XIC/2)), 0, XIC/2, (YIC)/2, &(G.vd->lay), 0, 0, 0, 0, "Toggles Layer visibility (Alt Num, Alt Shift Num)");
-
+ uiBlockSetCol(block, TH_AUTO);
+ }
xco+= 5;
uiBlockBeginAlign(block);
- for(a=5; a<10; a++)
+ for(a=5; a<10; a++) {
+ if (ob && ob->lay & 1<<a )
+ uiBlockSetCol(block, TH_ACTIVE);
+ else if ((G.vd->lay_used & 1<<a)==0)
+ uiBlockSetCol(block, BUTDBLUE);
uiDefButBitI(block, TOG, 1<<a, B_LAY+a, "", (short)(xco+a*(XIC/2)), (short)(YIC/2),(short)(XIC/2),(short)(YIC/2), &(G.vd->lay), 0, 0, 0, 0, "Toggles Layer visibility (Num, Shift Num)");
- for(a=5; a<10; a++)
+ uiBlockSetCol(block, TH_AUTO);
+ }
+ for(a=5; a<10; a++) {
+ if (ob && ob->lay & 1<<(a+10) )
+ uiBlockSetCol(block, TH_ACTIVE);
+ else if ((G.vd->lay_used & 1<<(a+10))==0)
+ uiBlockSetCol(block, BUTDBLUE);
uiDefButBitI(block, TOG, 1<<(a+10), B_LAY+10+a, "",(short)(xco+a*(XIC/2)), 0, XIC/2, (YIC)/2, &(G.vd->lay), 0, 0, 0, 0, "Toggles Layer visibility (Alt Num, Alt Shift Num)");
-
+ uiBlockSetCol(block, TH_AUTO);
+ }
uiBlockEndAlign(block);
xco+= (a-2)*(XIC/2)+3;
More information about the Bf-blender-cvs
mailing list