[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53270] trunk/blender/source/blender: code cleanup:
Campbell Barton
ideasman42 at gmail.com
Sat Dec 22 15:25:35 CET 2012
Revision: 53270
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53270
Author: campbellbarton
Date: 2012-12-22 14:25:34 +0000 (Sat, 22 Dec 2012)
Log Message:
-----------
code cleanup:
make vertex/weight flag names consistent
ME_EDIT_VERT_SEL --> ME_EDIT_PAINT_VERT_SEL
ME_EDIT_PAINT_MASK --> ME_EDIT_PAINT_FACE_SEL
also remove unused header BLO_soundfile.h
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/BKE_global.h
trunk/blender/source/blender/blenkernel/intern/paint.c
trunk/blender/source/blender/blenloader/CMakeLists.txt
trunk/blender/source/blender/editors/armature/meshlaplacian.c
trunk/blender/source/blender/editors/object/object_vgroup.c
trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c
trunk/blender/source/blender/editors/space_view3d/drawobject.c
trunk/blender/source/blender/makesdna/DNA_mesh_types.h
trunk/blender/source/blender/makesrna/intern/rna_mesh.c
Removed Paths:
-------------
trunk/blender/source/blender/blenloader/BLO_soundfile.h
Modified: trunk/blender/source/blender/blenkernel/BKE_global.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_global.h 2012-12-22 14:20:27 UTC (rev 53269)
+++ trunk/blender/source/blender/blenkernel/BKE_global.h 2012-12-22 14:25:34 UTC (rev 53270)
@@ -114,7 +114,7 @@
#define G_BACKBUFSEL (1 << 4)
#define G_PICKSEL (1 << 5)
-/* #define G_FACESELECT (1 << 8) use (mesh->editflag & ME_EDIT_PAINT_MASK) */
+/* #define G_FACESELECT (1 << 8) use (mesh->editflag & ME_EDIT_PAINT_FACE_SEL) */
#define G_SCRIPT_AUTOEXEC (1 << 13)
#define G_SCRIPT_OVERRIDE_PREF (1 << 14) /* when this flag is set ignore the userprefs */
Modified: trunk/blender/source/blender/blenkernel/intern/paint.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/paint.c 2012-12-22 14:20:27 UTC (rev 53269)
+++ trunk/blender/source/blender/blenkernel/intern/paint.c 2012-12-22 14:25:34 UTC (rev 53270)
@@ -154,7 +154,7 @@
return ( (ob != NULL) &&
(ob->type == OB_MESH) &&
(ob->data != NULL) &&
- (((Mesh *)ob->data)->editflag & ME_EDIT_PAINT_MASK) &&
+ (((Mesh *)ob->data)->editflag & ME_EDIT_PAINT_FACE_SEL) &&
(ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT))
);
}
@@ -165,7 +165,7 @@
return ( (ob != NULL) &&
(ob->type == OB_MESH) &&
(ob->data != NULL) &&
- (((Mesh *)ob->data)->editflag & ME_EDIT_VERT_SEL) &&
+ (((Mesh *)ob->data)->editflag & ME_EDIT_PAINT_VERT_SEL) &&
(ob->mode & OB_MODE_WEIGHT_PAINT)
);
}
Deleted: trunk/blender/source/blender/blenloader/BLO_soundfile.h
===================================================================
--- trunk/blender/source/blender/blenloader/BLO_soundfile.h 2012-12-22 14:20:27 UTC (rev 53269)
+++ trunk/blender/source/blender/blenloader/BLO_soundfile.h 2012-12-22 14:25:34 UTC (rev 53270)
@@ -1,41 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-#ifndef __BLO_SOUNDFILE_H__
-#define __BLO_SOUNDFILE_H__
-
-/** \file BLO_soundfile.h
- * \ingroup blenloader
- */
-
-#include "DNA_sound_types.h"
-#include "DNA_packedFile_types.h"
-
-struct bSound;
-struct PackedFile;
-
-#endif
-
Modified: trunk/blender/source/blender/blenloader/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/blenloader/CMakeLists.txt 2012-12-22 14:20:27 UTC (rev 53269)
+++ trunk/blender/source/blender/blenloader/CMakeLists.txt 2012-12-22 14:25:34 UTC (rev 53270)
@@ -52,7 +52,6 @@
BLO_blend_defs.h
BLO_readfile.h
BLO_runtime.h
- BLO_soundfile.h
BLO_sys_types.h
BLO_undofile.h
BLO_writefile.h
Modified: trunk/blender/source/blender/editors/armature/meshlaplacian.c
===================================================================
--- trunk/blender/source/blender/editors/armature/meshlaplacian.c 2012-12-22 14:20:27 UTC (rev 53269)
+++ trunk/blender/source/blender/editors/armature/meshlaplacian.c 2012-12-22 14:25:34 UTC (rev 53270)
@@ -666,8 +666,8 @@
*err_str = NULL;
/* count triangles and create mask */
- if ((use_face_sel = ((me->editflag & ME_EDIT_PAINT_MASK) != 0)) ||
- (use_vert_sel = ((me->editflag & ME_EDIT_VERT_SEL) != 0)))
+ if ((use_face_sel = ((me->editflag & ME_EDIT_PAINT_FACE_SEL) != 0)) ||
+ (use_vert_sel = ((me->editflag & ME_EDIT_PAINT_VERT_SEL) != 0)))
{
mask = MEM_callocN(sizeof(int) * me->totvert, "heat_bone_weighting mask");
Modified: trunk/blender/source/blender/editors/object/object_vgroup.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_vgroup.c 2012-12-22 14:20:27 UTC (rev 53269)
+++ trunk/blender/source/blender/editors/object/object_vgroup.c 2012-12-22 14:25:34 UTC (rev 53270)
@@ -88,7 +88,7 @@
if (ob->mode == OB_MODE_EDIT) {
return TRUE;
}
- else if (ob->type == OB_MESH && ((Mesh *)ob->data)->editflag & ME_EDIT_VERT_SEL) {
+ else if (ob->type == OB_MESH && ((Mesh *)ob->data)->editflag & ME_EDIT_PAINT_VERT_SEL) {
return TRUE;
}
else {
@@ -1410,7 +1410,7 @@
Mesh *me = ob->data;
MVert *mvert = me->mvert;
int *verts = NULL;
- if (!(me->editflag & ME_EDIT_VERT_SEL))
+ if (!(me->editflag & ME_EDIT_PAINT_VERT_SEL))
return;
for (i = 0; i < me->totvert && mvert; i++, mvert++) {
if (mvert->flag & SELECT) {
@@ -2071,7 +2071,7 @@
/* object mode / weight paint */
MVert *mv, *mv_mirr;
int vidx, vidx_mirr;
- const int use_vert_sel = (me->editflag & ME_EDIT_VERT_SEL) != 0;
+ const int use_vert_sel = (me->editflag & ME_EDIT_PAINT_VERT_SEL) != 0;
if (me->dvert == NULL) {
goto cleanup;
Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_image.c 2012-12-22 14:20:27 UTC (rev 53269)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_image.c 2012-12-22 14:25:34 UTC (rev 53270)
@@ -3344,7 +3344,7 @@
tpage = project_paint_face_image(ps, ps->dm_mtface, face_index);
- if (tpage && ((((Mesh *)ps->ob->data)->editflag & ME_EDIT_PAINT_MASK) == 0 || mf->flag & ME_FACE_SEL)) {
+ if (tpage && ((((Mesh *)ps->ob->data)->editflag & ME_EDIT_PAINT_FACE_SEL) == 0 || mf->flag & ME_FACE_SEL)) {
float *v1coSS, *v2coSS, *v3coSS, *v4coSS = NULL;
@@ -5104,7 +5104,7 @@
}
pop->s.ob = ob;
- pop->s.do_facesel = (me->editflag & ME_EDIT_PAINT_MASK) != 0;
+ pop->s.do_facesel = (me->editflag & ME_EDIT_PAINT_FACE_SEL) != 0;
/* for non prohect paint we need */
/* fill in derived mesh */
@@ -5705,7 +5705,7 @@
if (obact && obact->mode & OB_MODE_TEXTURE_PAINT) {
Mesh *me = BKE_mesh_from_object(obact);
if (me) {
- return !(me->editflag & ME_EDIT_PAINT_MASK);
+ return !(me->editflag & ME_EDIT_PAINT_FACE_SEL);
}
}
}
Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c 2012-12-22 14:20:27 UTC (rev 53269)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c 2012-12-22 14:25:34 UTC (rev 53270)
@@ -224,7 +224,7 @@
{
/* if no mcol: do not do */
/* if tface: only the involved faces, otherwise all */
- const int use_face_sel = (me->editflag & ME_EDIT_PAINT_MASK);
+ const int use_face_sel = (me->editflag & ME_EDIT_PAINT_FACE_SEL);
MFace *mface;
int a;
short *scolmain, *scol;
@@ -284,7 +284,7 @@
static void do_shared_vertexcol(Mesh *me, int do_tessface)
{
- const int use_face_sel = (me->editflag & ME_EDIT_PAINT_MASK);
+ const int use_face_sel = (me->editflag & ME_EDIT_PAINT_FACE_SEL);
MPoly *mp;
float (*scol)[4];
int i, j, has_shared = 0;
@@ -459,7 +459,7 @@
if (!me->mloopcol) return; /* possible we can't make mcol's */
- selected = (me->editflag & ME_EDIT_PAINT_MASK);
+ selected = (me->editflag & ME_EDIT_PAINT_FACE_SEL);
mp = me->mpoly;
for (i = 0; i < me->totpoly; i++, mp++) {
@@ -1030,7 +1030,7 @@
me = BKE_mesh_from_object(vc.obact);
if (me && me->dvert && vc.v3d && vc.rv3d) {
- const int use_vert_sel = (me->editflag & ME_EDIT_VERT_SEL) != 0;
+ const int use_vert_sel = (me->editflag & ME_EDIT_PAINT_VERT_SEL) != 0;
int v_idx_best = -1;
unsigned int index;
@@ -1115,7 +1115,7 @@
if (me && me->dvert && vc.v3d && vc.rv3d && vc.obact->defbase.first) {
const int defbase_tot = BLI_countlist(&vc.obact->defbase);
- const int use_vert_sel = (me->editflag & ME_EDIT_VERT_SEL) != 0;
+ const int use_vert_sel = (me->editflag & ME_EDIT_PAINT_VERT_SEL) != 0;
int *groups = MEM_callocN(defbase_tot * sizeof(int), "groups");
int found = FALSE;
unsigned int index;
@@ -2006,10 +2006,10 @@
mesh_octree_table(NULL, NULL, NULL, 'e');
mesh_mirrtopo_table(NULL, 'e');
- if (me->editflag & ME_EDIT_VERT_SEL) {
+ if (me->editflag & ME_EDIT_PAINT_VERT_SEL) {
BKE_mesh_flush_select_from_verts(me);
}
- else if (me->editflag & ME_EDIT_PAINT_MASK) {
+ else if (me->editflag & ME_EDIT_PAINT_FACE_SEL) {
BKE_mesh_flush_select_from_polys(me);
}
}
@@ -2241,14 +2241,14 @@
swap_m4m4(wpd->vc.rv3d->persmat, mat);
- use_vert_sel = (me->editflag & ME_EDIT_VERT_SEL) != 0;
+ use_vert_sel = (me->editflag & ME_EDIT_PAINT_VERT_SEL) != 0;
/* which faces are involved */
if (wp->flag & VP_AREA) {
/* Ugly hack, to avoid drawing vertex index when getting the face index buffer - campbell */
- me->editflag &= ~ME_EDIT_VERT_SEL;
+ me->editflag &= ~ME_EDIT_PAINT_VERT_SEL;
totindex = sample_backbuf_area(vc, indexar, me->totpoly, mval[0], mval[1], brush_size_pressure);
- me->editflag |= use_vert_sel ? ME_EDIT_VERT_SEL : 0;
+ me->editflag |= use_vert_sel ? ME_EDIT_PAINT_VERT_SEL : 0;
}
else {
indexar[0] = view3d_sample_backbuf(vc, mval[0], mval[1]);
@@ -2256,7 +2256,7 @@
else totindex = 0;
}
- if ((me->editflag & ME_EDIT_PAINT_MASK) && me->mpoly) {
+ if ((me->editflag & ME_EDIT_PAINT_FACE_SEL) && me->mpoly) {
for (index = 0; index < totindex; index++) {
if (indexar[index] && indexar[index] <= me->totpoly) {
MPoly *mpoly = ((MPoly *)me->mpoly) + (indexar[index] - 1);
@@ -2496,7 +2496,7 @@
ob->mode &= ~OB_MODE_VERTEX_PAINT;
- if (me->editflag & ME_EDIT_PAINT_MASK) {
+ if (me->editflag & ME_EDIT_PAINT_FACE_SEL) {
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list