[Bf-blender-cvs] [c38ca58] soc-2014-nurbs: Fixed the DNA problem.

Jonathan deWerd noreply at git.blender.org
Thu Jul 31 02:03:08 CEST 2014


Commit: c38ca588e5135f862b366e86de4b2912d93ce4d2
Author: Jonathan deWerd
Date:   Tue Jul 29 22:19:41 2014 -0400
Branches: soc-2014-nurbs
https://developer.blender.org/rBc38ca588e5135f862b366e86de4b2912d93ce4d2

Fixed the DNA problem.

===================================================================

M	source/blender/blenkernel/intern/surf_gridmesh.cpp
M	source/blender/makesdna/DNA_curve_types.h

===================================================================

diff --git a/source/blender/blenkernel/intern/surf_gridmesh.cpp b/source/blender/blenkernel/intern/surf_gridmesh.cpp
index ec2fbec..b43595f 100644
--- a/source/blender/blenkernel/intern/surf_gridmesh.cpp
+++ b/source/blender/blenkernel/intern/surf_gridmesh.cpp
@@ -121,7 +121,7 @@ void GridMesh::init_grid(int num_x_cells, int num_y_cells) {
 			GridMeshCoord& c = coords[gridpt_for_cell(i,j)];
 			c.x = llx + i*dx;
 			c.y = lly + j*dy;
-			c.z = 0;
+			//c.z = 0;
 		}
 	}
 	coords_len = (1+nx)*(1+ny)+1;
@@ -203,13 +203,13 @@ int GridMesh::vert_dup(int vert) {
 void GridMesh::vert_set_coord(int vert, double x, double y, double z) {
 	if (v[vert].owns_coords) {
 		GridMeshCoord& xyz = coords[v[vert].coord_idx];
-		xyz.x=x; xyz.y=y; xyz.z=z;
+		xyz.x=x; xyz.y=y; // xyz.z=z;
 		return;
 	}
 	int idx = coords_len;
 	coords_reserve(++coords_len);
 	GridMeshCoord *xyz = &coords[idx];
-	xyz->x=x; xyz->y=y; xyz->z=z;
+	xyz->x=x; xyz->y=y;// xyz->z=z;
 	v[vert].coord_idx = idx;
 	v[vert].owns_coords = 1;
 }
@@ -218,7 +218,7 @@ void GridMesh::vert_get_coord(int vert, double* xyz) {
 	GridMeshCoord *gmc = &coords[v[vert].coord_idx];
 	xyz[0] = gmc->x;
 	xyz[1] = gmc->y;
-	xyz[2] = gmc->z;
+	//xyz[2] = gmc->z;
 }
 
 
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index 665b0c2..2d17fc9 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -138,6 +138,7 @@ typedef struct NurbTrim {
 	struct NurbTrim *prev, *next;
 	ListBase nurb_list; /* A list of Nurb objects to trim with */
 	short type; /* NURBS_TRIM_OUTER, NURBS_TRIM_INNER */
+	short pad[3];
 } NurbTrim;
 
 /**
@@ -151,7 +152,7 @@ typedef struct Nurb {
 	short hide, flag;
 	
 	int pntsu, pntsv;		/* number of points in the U or V directions */
-	
+
 	short pad;
 	short resol_trim; /* tessellation res of trim curve (per pt) */
 	short resolu, resolv;	/* tessellation resolution in the U or V directions */
@@ -168,11 +169,10 @@ typedef struct Nurb {
 	
 	ListBase trims;
 	
-	unsigned UV_verts_count; /* UV mesh is cached  */
-	unsigned UV_tri_count;
+	int UV_verts_count; /* UV mesh is cached  */
+	int UV_tri_count;
 	float *UV_verts; /* 2*UV_verts_count floats */
 	int *UV_idxs; /* 3*UV_tri_count ints */
-	
 } Nurb;
 
 typedef struct CharInfo {




More information about the Bf-blender-cvs mailing list