diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-14 12:45:12 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-14 12:45:12 +0400 |
commit | a31869f267d7a393555383e1b49dd61c7133651e (patch) | |
tree | dfa38318b4785e4ed80a5d907b5d83e628917094 | |
parent | df433c7a1dd351831ca299e7aecfb7877a19b2f7 (diff) |
some picky rna/variable renaming:
Mesh.wp_vert_sel --> use_paint_mask_vertex
-rw-r--r-- | source/blender/editors/armature/meshlaplacian.c | 14 | ||||
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 32 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 12 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_header.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_mesh.c | 4 |
5 files changed, 32 insertions, 32 deletions
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index 127b2f4e663..4ce4a780d09 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -659,24 +659,24 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource, // Jason MVert *mv = me->mvert; - int selectedVerts; + int use_vert_sel= FALSE; *err_str= NULL; /* count triangles and create mask */ - if((me->editflag & ME_EDIT_PAINT_MASK) || (selectedVerts=(me->editflag & ME_EDIT_VERT_SEL))) + if((me->editflag & ME_EDIT_PAINT_MASK) || (use_vert_sel= ((me->editflag & ME_EDIT_VERT_SEL) != 0))) mask= MEM_callocN(sizeof(int)*me->totvert, "heat_bone_weighting mask"); for(totface=0, a=0, mface=me->mface; a<me->totface; a++, mface++) { totface++; if(mface->v4) totface++; // Jason (added selectedVerts content for vertex mask, they used to just equal 1) - if(mask && ((mface->flag & ME_FACE_SEL) || selectedVerts)) { - mask[mface->v1]= selectedVerts ? ((mv+mface->v1)->flag & 1): 1; - mask[mface->v2]= selectedVerts ? ((mv+mface->v2)->flag & 1): 1; - mask[mface->v3]= selectedVerts ? ((mv+mface->v3)->flag & 1): 1; + if(mask && ((mface->flag & ME_FACE_SEL) || use_vert_sel)) { + mask[mface->v1]= use_vert_sel ? ((mv+mface->v1)->flag & 1): 1; + mask[mface->v2]= use_vert_sel ? ((mv+mface->v2)->flag & 1): 1; + mask[mface->v3]= use_vert_sel ? ((mv+mface->v3)->flag & 1): 1; if(mface->v4) - mask[mface->v4]= selectedVerts ? ((mv+mface->v4)->flag & 1): 1; + mask[mface->v4]= use_vert_sel ? ((mv+mface->v4)->flag & 1): 1; } } diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 49ff4ac212d..7f78f25e1ce 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -706,7 +706,7 @@ static void vgroup_normalize(Object *ob) // Jason Mesh *me = ob->data; MVert *mv = me->mvert; - int selectedVerts = me->editflag & ME_EDIT_VERT_SEL; + const int use_vert_sel= (me->editflag & ME_EDIT_VERT_SEL) != 0; ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot); @@ -719,7 +719,7 @@ static void vgroup_normalize(Object *ob) for(i = 0; i < dvert_tot; i++) { // Jason - if(selectedVerts && !((mv+i)->flag & SELECT)) { + if(use_vert_sel && !((mv+i)->flag & SELECT)) { continue; } @@ -733,7 +733,7 @@ static void vgroup_normalize(Object *ob) if(weight_max > 0.0f) { for(i = 0; i < dvert_tot; i++) { // Jason - if(selectedVerts && !((mv+i)->flag & SELECT)) { + if(use_vert_sel && !((mv+i)->flag & SELECT)) { continue; } @@ -1114,11 +1114,11 @@ static void vgroup_fix(Scene *scene, Object *ob, float distToBe, float strength, Mesh *me = ob->data; MVert *mv = me->mvert; - int selectedVerts = me->editflag & ME_EDIT_VERT_SEL; + const int use_vert_sel= (me->editflag & ME_EDIT_VERT_SEL) != 0; int *verts = NULL; for(i = 0; i < me->totvert && mv; i++, mv++) { // Jason - if(selectedVerts && (mv->flag & SELECT)) { + if(use_vert_sel && (mv->flag & SELECT)) { int count=0; if((verts = getSurroundingVerts(me, i, &count))) { @@ -1168,7 +1168,7 @@ static void vgroup_levels(Object *ob, float offset, float gain) // Jason Mesh *me = ob->data; MVert *mv = me->mvert; - int selectedVerts = me->editflag & ME_EDIT_VERT_SEL; + const int use_vert_sel= (me->editflag & ME_EDIT_VERT_SEL) != 0; ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot); @@ -1179,7 +1179,7 @@ static void vgroup_levels(Object *ob, float offset, float gain) for(i = 0; i < dvert_tot; i++) { // Jason - if(selectedVerts && !((mv+i)->flag & SELECT)) { + if(use_vert_sel && !((mv+i)->flag & SELECT)) { continue; } @@ -1207,7 +1207,7 @@ static void vgroup_normalize_all(Object *ob, int lock_active) // Jason Mesh *me = ob->data; MVert *mv = me->mvert; - int selectedVerts = me->editflag & ME_EDIT_VERT_SEL; + const int use_vert_sel= (me->editflag & ME_EDIT_VERT_SEL) != 0; ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot); @@ -1219,7 +1219,7 @@ static void vgroup_normalize_all(Object *ob, int lock_active) float lock_iweight= 1.0f; int j; // Jason - if(selectedVerts && !((mv+i)->flag & SELECT)) { + if(use_vert_sel && !((mv+i)->flag & SELECT)) { continue; } @@ -1263,7 +1263,7 @@ static void vgroup_normalize_all(Object *ob, int lock_active) for(i = 0; i < dvert_tot; i++) { int j; // Jason - if(selectedVerts && !((mv+i)->flag & SELECT)) { + if(use_vert_sel && !((mv+i)->flag & SELECT)) { continue; } @@ -1332,7 +1332,7 @@ static void vgroup_invert(Object *ob, int auto_assign, int auto_remove) // Jason Mesh *me = ob->data; MVert *mv = me->mvert; - int selectedVerts = me->editflag & ME_EDIT_VERT_SEL; + const int use_vert_sel= (me->editflag & ME_EDIT_VERT_SEL) != 0; ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot); @@ -1344,7 +1344,7 @@ static void vgroup_invert(Object *ob, int auto_assign, int auto_remove) for(i = 0; i < dvert_tot; i++) { // Jason - if(selectedVerts && !((mv+i)->flag & SELECT)) { + if(use_vert_sel && !((mv+i)->flag & SELECT)) { continue; } dvert = dvert_array[i]; @@ -1462,7 +1462,7 @@ static void vgroup_clean(Object *ob, float eul, int keep_single) // Jason Mesh *me = ob->data; MVert *mv = me->mvert; - int selectedVerts = me->editflag & ME_EDIT_VERT_SEL; + const int use_vert_sel= (me->editflag & ME_EDIT_VERT_SEL) != 0; ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot); @@ -1473,7 +1473,7 @@ static void vgroup_clean(Object *ob, float eul, int keep_single) for(i = 0; i < dvert_tot; i++) { // Jason - if(selectedVerts && !((mv+i)->flag & SELECT)) { + if(use_vert_sel && !((mv+i)->flag & SELECT)) { continue; } dvert = dvert_array[i]; @@ -1500,7 +1500,7 @@ static void vgroup_clean_all(Object *ob, float eul, int keep_single) // Jason Mesh *me = ob->data; MVert *mv = me->mvert; - int selectedVerts = me->editflag & ME_EDIT_VERT_SEL; + const int use_vert_sel= (me->editflag & ME_EDIT_VERT_SEL) != 0; ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot); @@ -1508,7 +1508,7 @@ static void vgroup_clean_all(Object *ob, float eul, int keep_single) for(i = 0; i < dvert_tot; i++) { int j; // Jason - if(selectedVerts && !((mv+i)->flag & SELECT)) { + if(use_vert_sel && !((mv+i)->flag & SELECT)) { continue; } diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 584e88d6a7a..ec2e9761940 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -400,14 +400,14 @@ void wpaint_fill(VPaint *wp, Object *ob, float paintweight) int vgroup_mirror= -1; int selected; // Jason - int selectedVerts; + int use_vert_sel; me= ob->data; if(me==NULL || me->totface==0 || me->dvert==NULL || !me->mface) return; selected= (me->editflag & ME_EDIT_PAINT_MASK); // Jason - selectedVerts = (me->editflag & ME_EDIT_VERT_SEL); + use_vert_sel= (me->editflag & ME_EDIT_VERT_SEL) != 0; indexar= get_indexarray(me); @@ -444,7 +444,7 @@ void wpaint_fill(VPaint *wp, Object *ob, float paintweight) for (i=0; i<3 || faceverts[i]; i++) { if(me->dvert[faceverts[i]].flag) { // Jason - if(selectedVerts && ((me->mvert[faceverts[i]].flag & SELECT) == 0)) { + if(use_vert_sel && ((me->mvert[faceverts[i]].flag & SELECT) == 0)) { continue; } @@ -1900,7 +1900,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P float mval[2], pressure; // Jason - int selectedVerts; + int use_vert_sel; /* cannot paint if there is no stroke data */ if (wpd == NULL) { @@ -1950,7 +1950,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P } } // Jason - selectedVerts = (me->editflag & ME_EDIT_VERT_SEL); + use_vert_sel= (me->editflag & ME_EDIT_VERT_SEL) != 0; if((me->editflag & ME_EDIT_PAINT_MASK) && me->mface) { for(index=0; index<totindex; index++) { @@ -1976,7 +1976,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P if(indexar[index] && indexar[index]<=me->totface) { MFace *mface= me->mface + (indexar[index]-1); - if(selectedVerts) { + if(use_vert_sel) { me->dvert[mface->v1].flag = (me->mvert[mface->v1].flag & SELECT); me->dvert[mface->v2].flag = (me->mvert[mface->v2].flag & SELECT); me->dvert[mface->v3].flag = (me->mvert[mface->v3].flag & SELECT); diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index b29373d0770..359f69596e5 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -505,7 +505,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) // Jason row= uiLayoutRow(layout, 1); uiItemR(row, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); - uiItemR(row, &meshptr, "wp_vert_sel", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); + uiItemR(row, &meshptr, "use_paint_mask_vertex", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); } } else { const char *str_menu; diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index a8b191c0576..16817001bf4 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -2096,9 +2096,9 @@ static void rna_def_mesh(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Mesh_update_facemask"); /* Jason */ - prop= RNA_def_property(srna, "wp_vert_sel", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_paint_mask_vertex", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "editflag", ME_EDIT_VERT_SEL); - RNA_def_property_ui_text(prop, "Vertex Selection", "Vertex selection masking for painting"); + RNA_def_property_ui_text(prop, "Vertex Selection", "Vertex selection masking for painting (weight paint only)"); RNA_def_property_ui_icon(prop, ICON_VERTEXSEL, 0); RNA_def_property_update(prop, 0, "rna_Mesh_update_vertmask"); |