[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14765] trunk/blender/source/blender/src: partial fix for [#11107] two problems with explode modifier and vertex group
Campbell Barton
ideasman42 at gmail.com
Fri May 9 15:59:03 CEST 2008
Revision: 14765
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14765
Author: campbellbarton
Date: 2008-05-09 15:59:03 +0200 (Fri, 09 May 2008)
Log Message:
-----------
partial fix for [#11107] two problems with explode modifier and vertex group
tooltip patch from olivs - [#10218] Corrected a few tooltips in shading buttons
Modified Paths:
--------------
trunk/blender/source/blender/src/buttons_editing.c
trunk/blender/source/blender/src/buttons_shading.c
trunk/blender/source/blender/src/header_image.c
Modified: trunk/blender/source/blender/src/buttons_editing.c
===================================================================
--- trunk/blender/source/blender/src/buttons_editing.c 2008-05-09 13:04:36 UTC (rev 14764)
+++ trunk/blender/source/blender/src/buttons_editing.c 2008-05-09 13:59:03 UTC (rev 14765)
@@ -1651,6 +1651,12 @@
emd->flag |= eExplodeFlag_CalcFaces;
}
+void modifiers_explodeDelVg(void *arg1, void *arg2)
+{
+ ExplodeModifierData *emd=arg1;
+ emd->vgroup = 0;
+}
+
static int modifier_is_fluid_particles(ModifierData *md) {
if(md->type == eModifierType_ParticleSystem) {
if(((ParticleSystemModifierData *)md)->psys->part->type == PART_FLUID)
@@ -2417,12 +2423,16 @@
char *menustr= get_vertexgroup_menustr(ob);
int defCount=BLI_countlist(&ob->defbase);
if(defCount==0) emd->vgroup=0;
-
- but=uiDefButS(block, MENU, B_MODIFIER_RECALC, menustr, lx, (cy-=19), buttonWidth/2,19, &emd->vgroup, 0, defCount, 0, 0, "Protect this vertex group");
+ uiBlockBeginAlign(block);
+ but=uiDefButS(block, MENU, B_MODIFIER_RECALC, menustr, lx, (cy-=19), buttonWidth-20,19, &emd->vgroup, 0, defCount, 0, 0, "Protect this vertex group");
uiButSetFunc(but,modifiers_explodeFacepa,emd,0);
MEM_freeN(menustr);
+
+ but=uiDefIconBut(block, BUT, B_MODIFIER_RECALC, ICON_X, (lx+buttonWidth)-20, cy, 20,19, 0, 0, 0, 0, 0, "Disable use of vertex group");
+ uiButSetFunc(but, modifiers_explodeDelVg, (void *)emd, (void *)NULL);
+
- but=uiDefButF(block, NUMSLI, B_MODIFIER_RECALC, "", lx+buttonWidth/2, cy, buttonWidth/2,19, &emd->protect, 0.0f, 1.0f, 0, 0, "Clean vertex group edges");
+ but=uiDefButF(block, NUMSLI, B_MODIFIER_RECALC, "", lx, (cy-=19), buttonWidth,19, &emd->protect, 0.0f, 1.0f, 0, 0, "Clean vertex group edges");
uiButSetFunc(but,modifiers_explodeFacepa,emd,0);
but=uiDefBut(block, BUT, B_MODIFIER_RECALC, "Refresh", lx, (cy-=19), buttonWidth/2,19, 0, 0, 0, 0, 0, "Recalculate faces assigned to particles");
@@ -2432,6 +2442,7 @@
uiDefButBitS(block, TOG, eExplodeFlag_Unborn, B_MODIFIER_RECALC, "Unborn", lx, (cy-=19), buttonWidth/3,19, &emd->flag, 0, 0, 0, 0, "Show mesh when particles are unborn");
uiDefButBitS(block, TOG, eExplodeFlag_Alive, B_MODIFIER_RECALC, "Alive", lx+buttonWidth/3, cy, buttonWidth/3,19, &emd->flag, 0, 0, 0, 0, "Show mesh when particles are alive");
uiDefButBitS(block, TOG, eExplodeFlag_Dead, B_MODIFIER_RECALC, "Dead", lx+buttonWidth*2/3, cy, buttonWidth/3,19, &emd->flag, 0, 0, 0, 0, "Show mesh when particles are dead");
+ uiBlockEndAlign(block);
}
uiBlockEndAlign(block);
Modified: trunk/blender/source/blender/src/buttons_shading.c
===================================================================
--- trunk/blender/source/blender/src/buttons_shading.c 2008-05-09 13:04:36 UTC (rev 14764)
+++ trunk/blender/source/blender/src/buttons_shading.c 2008-05-09 13:59:03 UTC (rev 14765)
@@ -3311,7 +3311,7 @@
uiDefButBitS(block, TOG3, MAP_RAYMIRR, B_MATPRV, "RayMir", 50,160,40,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the ray-mirror value");
uiDefButBitS(block, TOG3, MAP_ALPHA, B_MATPRV, "Alpha", 90,160,40,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the alpha value");
uiDefButBitS(block, TOG3, MAP_EMIT, B_MATPRV, "Emit", 130,160,50,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the emit value");
- uiDefButBitS(block, TOG3, MAP_TRANSLU, B_MATPRV, "TransLu", 180,160,40,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the layer blending value");
+ uiDefButBitS(block, TOG3, MAP_TRANSLU, B_MATPRV, "TransLu", 180,160,40,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the translucency value");
if(from_nodes==0)
uiDefButBitS(block, TOG3, MAP_DISPLACE, B_MATPRV, "Disp", 220,160,50,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture displace the surface");
uiBlockSetCol(block, TH_BUT_SETTING1);
@@ -3323,7 +3323,7 @@
uiDefButBitS(block, TOG3, MAP_RAYMIRR, B_MATPRV, "RayMir", 60,160,50,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the ray-mirror value");
uiDefButBitS(block, TOG3, MAP_ALPHA, B_MATPRV, "Alpha", 110,160,50,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the alpha value");
uiDefButBitS(block, TOG3, MAP_EMIT, B_MATPRV, "Emit", 160,160,45,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the emit value");
- uiDefButBitS(block, TOG3, MAP_TRANSLU, B_MATPRV, "TransLu", 205,160,60,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the layer blending value");
+ uiDefButBitS(block, TOG3, MAP_TRANSLU, B_MATPRV, "TransLu", 205,160,60,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the translucency value");
if(from_nodes==0)
uiDefButBitS(block, TOG3, MAP_DISPLACE, B_MATPRV, "Disp", 265,160,45,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture displace the surface");
}
@@ -3633,7 +3633,7 @@
uiDefButF(block, NUMSLI, B_MATPRV, "IOR: ",
X2CLM2, yco-=BUTH, BUTW2, BUTH, &(ma->ang), 1.0, 3.0, 100, 2, "Sets angular index of refraction for raytraced refraction");
uiDefButF(block, NUMSLI, B_MATPRV, "Fresnel: ",
- X2CLM2, yco-=BUTH, BUTW2, BUTH, &(ma->fresnel_tra), 0.0, 5.0, 10, 2, "Power of Fresnel for mirror reflection");
+ X2CLM2, yco-=BUTH, BUTW2, BUTH, &(ma->fresnel_tra), 0.0, 5.0, 10, 2, "Power of Fresnel for transparency (Ray or ZTransp)");
uiDefButF(block, NUMSLI, B_MATPRV, "Fac: ",
X2CLM2, yco-=BUTH, BUTW2, BUTH, &(ma->fresnel_tra_i), 1.0, 5.0, 10, 2, "Blending factor for Fresnel");
uiBlockEndAlign(block);
@@ -4164,7 +4164,7 @@
if(ma) uiSetButLock(ma->id.lib!=NULL, ERROR_LIBDATA_MESSAGE);
if(ma)
- uiDefButC(block, TOG, B_MAT_USENODES, "Nodes", xco+5,160,300-xco-5,20, &ma->use_nodes, 0.0f, 0.0f, 0, 0, "");
+ uiDefButC(block, TOG, B_MAT_USENODES, "Nodes", xco+5,160,300-xco-5,20, &ma->use_nodes, 0.0f, 0.0f, 0, 0, "Enables as a Nodes Material");
if(ob->actcol==0) ob->actcol= 1; /* because of TOG|BIT button */
Modified: trunk/blender/source/blender/src/header_image.c
===================================================================
--- trunk/blender/source/blender/src/header_image.c 2008-05-09 13:04:36 UTC (rev 14764)
+++ trunk/blender/source/blender/src/header_image.c 2008-05-09 13:59:03 UTC (rev 14765)
@@ -1208,7 +1208,7 @@
} else {
uiBlockBeginAlign(block);
- uiDefIconButBitI(block, TOGN, SI_SELACTFACE, B_REDR, ICON_VERTEXSEL, xco,0,XIC,YIC, &G.sima->flag, 1.0, 0.0, 0, 0, "UV Vertex select mode)");
+ uiDefIconButBitI(block, TOGN, SI_SELACTFACE, B_REDR, ICON_VERTEXSEL, xco,0,XIC,YIC, &G.sima->flag, 1.0, 0.0, 0, 0, "UV Vertex select mode");
xco+= XIC;
uiDefIconButBitI(block, TOG, SI_SELACTFACE, B_REDR, ICON_FACESEL, xco,0,XIC,YIC, &G.sima->flag, 0, 0, 0, 0, "UV Face select mode");
xco+= XIC+8;
More information about the Bf-blender-cvs
mailing list