[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58815] branches/soc-2013-paint/source/ blender: Merge trunk -r58813 into soc-2013-paint

Antony Riakiotakis kalast at gmail.com
Fri Aug 2 02:26:11 CEST 2013


Revision: 58815
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58815
Author:   psy-fi
Date:     2013-08-02 00:26:10 +0000 (Fri, 02 Aug 2013)
Log Message:
-----------
Merge trunk -r58813 into soc-2013-paint

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58813

Modified Paths:
--------------
    branches/soc-2013-paint/source/blender/blenkernel/BKE_blender.h
    branches/soc-2013-paint/source/blender/blenkernel/intern/cdderivedmesh.c
    branches/soc-2013-paint/source/blender/blenlib/BLI_math_geom.h
    branches/soc-2013-paint/source/blender/blenlib/BLI_math_vector.h
    branches/soc-2013-paint/source/blender/blenlib/intern/math_geom.c
    branches/soc-2013-paint/source/blender/blenloader/intern/readfile.c
    branches/soc-2013-paint/source/blender/bmesh/intern/bmesh_marking.c
    branches/soc-2013-paint/source/blender/bmesh/operators/bmo_dupe.c
    branches/soc-2013-paint/source/blender/bmesh/operators/bmo_edgenet.c
    branches/soc-2013-paint/source/blender/editors/sculpt_paint/sculpt.c
    branches/soc-2013-paint/source/blender/editors/space_view3d/view3d_select.c
    branches/soc-2013-paint/source/blender/makesrna/intern/rna_brush.c
    branches/soc-2013-paint/source/blender/modifiers/intern/MOD_skin.c

Modified: branches/soc-2013-paint/source/blender/blenkernel/BKE_blender.h
===================================================================
--- branches/soc-2013-paint/source/blender/blenkernel/BKE_blender.h	2013-08-02 00:25:49 UTC (rev 58814)
+++ branches/soc-2013-paint/source/blender/blenkernel/BKE_blender.h	2013-08-02 00:26:10 UTC (rev 58815)
@@ -42,8 +42,7 @@
  * and keep comment above the defines.
  * Use STRINGIFY() rather than defining with quotes */
 #define BLENDER_VERSION         268
-#define BLENDER_SUBVERSION      1
-
+#define BLENDER_SUBVERSION      2
 /* 262 was the last editmesh release but it has compatibility code for bmesh data */
 #define BLENDER_MINVERSION      262
 #define BLENDER_MINSUBVERSION   0

Modified: branches/soc-2013-paint/source/blender/blenkernel/intern/cdderivedmesh.c
===================================================================
--- branches/soc-2013-paint/source/blender/blenkernel/intern/cdderivedmesh.c	2013-08-02 00:25:49 UTC (rev 58814)
+++ branches/soc-2013-paint/source/blender/blenkernel/intern/cdderivedmesh.c	2013-08-02 00:26:10 UTC (rev 58815)
@@ -1969,8 +1969,7 @@
 
 	index = dm->getVertDataArray(dm, CD_ORIGINDEX);
 
-	eve = BM_iter_new(&iter, bm, BM_VERTS_OF_MESH, NULL);
-	for (i = 0; eve; eve = BM_iter_step(&iter), i++, index++) {
+	BM_ITER_MESH_INDEX (eve, &iter, bm, BM_VERTS_OF_MESH, i) {
 		MVert *mv = &mvert[i];
 
 		copy_v3_v3(mv->co, eve->co);
@@ -1983,15 +1982,14 @@
 
 		if (cd_vert_bweight_offset != -1) mv->bweight = BM_ELEM_CD_GET_FLOAT_AS_UCHAR(eve, cd_vert_bweight_offset);
 
-		if (add_orig) *index = i;
+		if (add_orig) *index++ = i;
 
 		CustomData_from_bmesh_block(&bm->vdata, &dm->vertData, eve->head.data, i);
 	}
 	bm->elem_index_dirty &= ~BM_VERT;
 
 	index = dm->getEdgeDataArray(dm, CD_ORIGINDEX);
-	eed = BM_iter_new(&iter, bm, BM_EDGES_OF_MESH, NULL);
-	for (i = 0; eed; eed = BM_iter_step(&iter), i++, index++) {
+	BM_ITER_MESH_INDEX (eed, &iter, bm, BM_EDGES_OF_MESH, i) {
 		MEdge *med = &medge[i];
 
 		BM_elem_index_set(eed, i); /* set_inline */
@@ -2013,7 +2011,7 @@
 		if (cd_edge_bweight_offset != -1) med->bweight = BM_ELEM_CD_GET_FLOAT_AS_UCHAR(eed, cd_edge_bweight_offset);
 
 		CustomData_from_bmesh_block(&bm->edata, &dm->edgeData, eed->head.data, i);
-		if (add_orig) *index = i;
+		if (add_orig) *index++ = i;
 	}
 	bm->elem_index_dirty &= ~BM_EDGE;
 
@@ -2023,7 +2021,7 @@
 		BM_mesh_elem_index_ensure(bm, BM_FACE);
 
 		index = dm->getTessFaceDataArray(dm, CD_ORIGINDEX);
-		for (i = 0; i < dm->numTessFaceData; i++, index++) {
+		for (i = 0; i < dm->numTessFaceData; i++) {
 			MFace *mf = &mface[i];
 			const BMLoop **l = em_looptris[i];
 			efa = l[0]->f;
@@ -2036,7 +2034,7 @@
 			mf->flag = BM_face_flag_to_mflag(efa);
 
 			/* map mfaces to polygons in the same cddm intentionally */
-			*index = BM_elem_index_get(efa);
+			*index++ = BM_elem_index_get(efa);
 
 			loops_to_customdata_corners(bm, &dm->faceData, i, l, numCol, numTex);
 			test_index_face(mf, &dm->faceData, i, 3);
@@ -2045,8 +2043,7 @@
 	
 	index = CustomData_get_layer(&dm->polyData, CD_ORIGINDEX);
 	j = 0;
-	efa = BM_iter_new(&iter, bm, BM_FACES_OF_MESH, NULL);
-	for (i = 0; efa; i++, efa = BM_iter_step(&iter), index++) {
+	BM_ITER_MESH_INDEX (efa, &iter, bm, BM_FACES_OF_MESH, i) {
 		BMLoop *l_iter;
 		BMLoop *l_first;
 		MPoly *mp = &mpoly[i];
@@ -2070,7 +2067,7 @@
 
 		CustomData_from_bmesh_block(&bm->pdata, &dm->polyData, efa->head.data, i);
 
-		if (add_orig) *index = i;
+		if (add_orig) *index++ = i;
 	}
 	bm->elem_index_dirty &= ~BM_FACE;
 

Modified: branches/soc-2013-paint/source/blender/blenlib/BLI_math_geom.h
===================================================================
--- branches/soc-2013-paint/source/blender/blenlib/BLI_math_geom.h	2013-08-02 00:25:49 UTC (rev 58814)
+++ branches/soc-2013-paint/source/blender/blenlib/BLI_math_geom.h	2013-08-02 00:26:10 UTC (rev 58815)
@@ -147,10 +147,6 @@
 int isect_point_tri_v2_cw(const float pt[2], const float v1[2], const float v2[2], const float v3[2]);
 int isect_point_tri_v2_int(const int x1, const int y1, const int x2, const int y2, const int a, const int b);
 bool isect_point_tri_prism_v3(const float p[3], const float v1[3], const float v2[3], const float v3[3]);
-void isect_point_quad_uv_v2(const float v0[2], const float v1[2], const float v2[2], const float v3[2],
-                            const float pt[2], float r_uv[2]);
-void isect_point_face_uv_v2(const int isquad, const float v0[2], const float v1[2], const float v2[2],
-                            const float v3[2], const float pt[2], float r_uv[2]);
 
 /* axis-aligned bounding box */
 bool isect_aabb_aabb_v3(const float min1[3], const float max1[3], const float min2[3], const float max2[3]);
@@ -198,7 +194,7 @@
 void barycentric_weights_v2_quad(const float v1[2], const float v2[2], const float v3[2], const float v4[2],
                                  const float co[2], float w[4]);
 
-int barycentric_coords_v2(const float v1[2], const float v2[2], const float v3[2], const float co[2], float w[3]);
+bool barycentric_coords_v2(const float v1[2], const float v2[2], const float v3[2], const float co[2], float w[3]);
 int barycentric_inside_triangle_v2(const float w[3]);
 
 void resolve_tri_uv(float r_uv[2], const float st[2], const float st0[2], const float st1[2], const float st2[2]);
@@ -273,9 +269,9 @@
 
 float form_factor_quad(const float p[3], const float n[3],
                        const float q0[3], const float q1[3], const float q2[3], const float q3[3]);
-int form_factor_visible_quad(const float p[3], const float n[3],
-                             const float v0[3], const float v1[3], const float v2[3],
-                             float q0[3], float q1[3], float q2[3], float q3[3]);
+bool form_factor_visible_quad(const float p[3], const float n[3],
+                              const float v0[3], const float v1[3], const float v2[3],
+                              float q0[3], float q1[3], float q2[3], float q3[3]);
 float form_factor_hemi_poly(float p[3], float n[3],
                             float v1[3], float v2[3], float v3[3], float v4[3]);
 

Modified: branches/soc-2013-paint/source/blender/blenlib/BLI_math_vector.h
===================================================================
--- branches/soc-2013-paint/source/blender/blenlib/BLI_math_vector.h	2013-08-02 00:25:49 UTC (rev 58814)
+++ branches/soc-2013-paint/source/blender/blenlib/BLI_math_vector.h	2013-08-02 00:26:10 UTC (rev 58815)
@@ -47,6 +47,12 @@
 #  pragma GCC diagnostic ignored "-Wredundant-decls"
 #endif
 
+#ifdef __GNUC__
+#  define UNUSED_RESULT_ATTR __attribute__((warn_unused_result))
+#else
+#  define UNUSED_RESULT_ATTR
+#endif
+
 MINLINE void zero_v2(float r[2]);
 MINLINE void zero_v3(float r[3]);
 MINLINE void zero_v4(float r[4]);
@@ -115,10 +121,10 @@
 MINLINE void mul_v3_v3v3(float r[3], const float a[3], const float b[3]);
 MINLINE void mul_v4_fl(float r[4], float f);
 MINLINE void mul_v4_v4fl(float r[3], const float a[3], float f);
-MINLINE float mul_project_m4_v3_zfac(float mat[4][4], const float co[3]);
-MINLINE float dot_m3_v3_row_x(float M[3][3], const float a[3]);
-MINLINE float dot_m3_v3_row_y(float M[3][3], const float a[3]);
-MINLINE float dot_m3_v3_row_z(float M[3][3], const float a[3]);
+MINLINE float mul_project_m4_v3_zfac(float mat[4][4], const float co[3])  UNUSED_RESULT_ATTR;
+MINLINE float dot_m3_v3_row_x(float M[3][3], const float a[3])  UNUSED_RESULT_ATTR;
+MINLINE float dot_m3_v3_row_y(float M[3][3], const float a[3])  UNUSED_RESULT_ATTR;
+MINLINE float dot_m3_v3_row_z(float M[3][3], const float a[3])  UNUSED_RESULT_ATTR;
 
 MINLINE void madd_v3_v3fl(float r[3], const float a[3], float f);
 MINLINE void madd_v3_v3v3(float r[3], const float a[3], const float b[3]);
@@ -137,10 +143,10 @@
 
 MINLINE void negate_v3_short(short r[3]);
 
-MINLINE float dot_v2v2(const float a[2], const float b[2]);
-MINLINE float dot_v3v3(const float a[3], const float b[3]);
+MINLINE float dot_v2v2(const float a[2], const float b[2])  UNUSED_RESULT_ATTR;
+MINLINE float dot_v3v3(const float a[3], const float b[3])  UNUSED_RESULT_ATTR;
 
-MINLINE float cross_v2v2(const float a[2], const float b[2]);
+MINLINE float cross_v2v2(const float a[2], const float b[2])  UNUSED_RESULT_ATTR;
 MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3]);
 
 MINLINE void add_newell_cross_v3_v3v3(float n[3], const float v_prev[3], const float v_curr[3]);
@@ -149,20 +155,20 @@
 
 /*********************************** Length **********************************/
 
-MINLINE float len_squared_v2(const float v[2]);
-MINLINE float len_squared_v3(const float v[3]);
-MINLINE float len_manhattan_v2(const float v[2]);
-MINLINE int   len_manhattan_v2_int(const int v[2]);
-MINLINE float len_manhattan_v3(const float v[3]);
-MINLINE float len_v2(const float a[2]);
-MINLINE float len_v2v2(const float a[2], const float b[2]);
-MINLINE float len_squared_v2v2(const float a[2], const float b[2]);
-MINLINE float len_squared_v3v3(const float a[3], const float b[3]);
-MINLINE float len_manhattan_v2v2(const float a[2], const float b[2]);
-MINLINE int   len_manhattan_v2v2_int(const int a[2], const int b[2]);
-MINLINE float len_manhattan_v3v3(const float a[3], const float b[3]);
-MINLINE float len_v3(const float a[3]);
-MINLINE float len_v3v3(const float a[3], const float b[3]);
+MINLINE float len_squared_v2(const float v[2])  UNUSED_RESULT_ATTR;
+MINLINE float len_squared_v3(const float v[3])  UNUSED_RESULT_ATTR;
+MINLINE float len_manhattan_v2(const float v[2])  UNUSED_RESULT_ATTR;
+MINLINE int   len_manhattan_v2_int(const int v[2])  UNUSED_RESULT_ATTR;
+MINLINE float len_manhattan_v3(const float v[3])  UNUSED_RESULT_ATTR;
+MINLINE float len_v2(const float a[2])  UNUSED_RESULT_ATTR;
+MINLINE float len_v2v2(const float a[2], const float b[2])  UNUSED_RESULT_ATTR;
+MINLINE float len_squared_v2v2(const float a[2], const float b[2])  UNUSED_RESULT_ATTR;
+MINLINE float len_squared_v3v3(const float a[3], const float b[3])  UNUSED_RESULT_ATTR;
+MINLINE float len_manhattan_v2v2(const float a[2], const float b[2])  UNUSED_RESULT_ATTR;
+MINLINE int   len_manhattan_v2v2_int(const int a[2], const int b[2])  UNUSED_RESULT_ATTR;
+MINLINE float len_manhattan_v3v3(const float a[3], const float b[3])  UNUSED_RESULT_ATTR;
+MINLINE float len_v3(const float a[3])  UNUSED_RESULT_ATTR;

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list