[Bf-blender-cvs] [4eed4b3] master: Text3d: remove sepchar, old feature which no longer has any UI access.

Campbell Barton noreply at git.blender.org
Sun Jan 5 11:15:40 CET 2014


Commit: 4eed4b3bcd6af2a3f0b71220cd7e8c8286bd9e27
Author: Campbell Barton
Date:   Sun Jan 5 20:15:39 2014 +1100
https://developer.blender.org/rB4eed4b3bcd6af2a3f0b71220cd7e8c8286bd9e27

Text3d: remove sepchar, old feature which no longer has any UI access.

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

M	source/blender/blenkernel/intern/font.c
M	source/blender/makesdna/DNA_curve_types.h

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

diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index 0fddce5..59061c2 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -1011,63 +1011,38 @@ makebreak:
 		BKE_nurbList_free(&cu->nurb);
 		
 		ct = chartransdata;
-		if (cu->sepchar == 0) {
-			for (i = 0; i < slen; i++) {
-				unsigned int cha = (unsigned int) mem[i];
-				info = &(custrinfo[i]);
-				if (info->mat_nr > (ob->totcol)) {
-					/* printf("Error: Illegal material index (%d) in text object, setting to 0\n", info->mat_nr); */
-					info->mat_nr = 0;
-				}
-				/* We do not want to see any character for \n or \r */
-				if (cha != '\n' && cha != '\r')
-					buildchar(bmain, cu, cha, info, ct->xof, ct->yof, ct->rot, i);
-				
-				if ((info->flag & CU_CHINFO_UNDERLINE) && (cu->textoncurve == NULL) && (cha != '\n') && (cha != '\r')) {
-					float ulwidth, uloverlap = 0.0f;
-					
-					if ((i < (slen - 1)) && (mem[i + 1] != '\n') && (mem[i + 1] != '\r') &&
-					    ((mem[i + 1] != ' ') || (custrinfo[i + 1].flag & CU_CHINFO_UNDERLINE)) &&
-					    ((custrinfo[i + 1].flag & CU_CHINFO_WRAP) == 0))
-					{
-						uloverlap = xtrax + 0.1f;
-					}
-					/* Find the character, the characters has to be in the memory already
-					 * since character checking has been done earlier already. */
-					che = find_vfont_char(vfd, cha);
-
-					twidth = char_width(cu, che, info);
-					ulwidth = cu->fsize * ((twidth * (1.0f + (info->kern / 40.0f))) + uloverlap);
-					build_underline(cu, ct->xof * cu->fsize, ct->yof * cu->fsize + (cu->ulpos - 0.05f) * cu->fsize,
-					                ct->xof * cu->fsize + ulwidth,
-					                ct->yof * cu->fsize + (cu->ulpos - 0.05f) * cu->fsize - cu->ulheight * cu->fsize,
-					                i, info->mat_nr);
-				}
-				ct++;
+		for (i = 0; i < slen; i++) {
+			unsigned int cha = (unsigned int) mem[i];
+			info = &(custrinfo[i]);
+			if (info->mat_nr > (ob->totcol)) {
+				/* printf("Error: Illegal material index (%d) in text object, setting to 0\n", info->mat_nr); */
+				info->mat_nr = 0;
 			}
-		}
-		else {
-			int outta = 0;
-			for (i = 0; (i < slen) && (outta == 0); i++) {
-				ascii = mem[i];
-				info = &(custrinfo[i]);
-				if (cu->sepchar == (i + 1)) {
-					float vecyo[3];
-
-					vecyo[0] = ct->xof;
-					vecyo[1] = ct->yof;
-					vecyo[2] = 0.0f;
-
-					mem[0] = ascii;
-					mem[1] = 0;
-					custrinfo[0] = *info;
-					cu->len = cu->len_wchar = cu->pos = 1;
-					mul_v3_m4v3(ob->loc, ob->obmat, vecyo);
-					outta = 1;
-					cu->sepchar = 0;
+			/* We do not want to see any character for \n or \r */
+			if (cha != '\n' && cha != '\r')
+				buildchar(bmain, cu, cha, info, ct->xof, ct->yof, ct->rot, i);
+
+			if ((info->flag & CU_CHINFO_UNDERLINE) && (cu->textoncurve == NULL) && (cha != '\n') && (cha != '\r')) {
+				float ulwidth, uloverlap = 0.0f;
+
+				if ((i < (slen - 1)) && (mem[i + 1] != '\n') && (mem[i + 1] != '\r') &&
+				    ((mem[i + 1] != ' ') || (custrinfo[i + 1].flag & CU_CHINFO_UNDERLINE)) &&
+				    ((custrinfo[i + 1].flag & CU_CHINFO_WRAP) == 0))
+				{
+					uloverlap = xtrax + 0.1f;
 				}
-				ct++;
+				/* Find the character, the characters has to be in the memory already
+				 * since character checking has been done earlier already. */
+				che = find_vfont_char(vfd, cha);
+
+				twidth = char_width(cu, che, info);
+				ulwidth = cu->fsize * ((twidth * (1.0f + (info->kern / 40.0f))) + uloverlap);
+				build_underline(cu, ct->xof * cu->fsize, ct->yof * cu->fsize + (cu->ulpos - 0.05f) * cu->fsize,
+				                ct->xof * cu->fsize + ulwidth,
+				                ct->yof * cu->fsize + (cu->ulpos - 0.05f) * cu->fsize - cu->ulheight * cu->fsize,
+				                i, info->mat_nr);
 			}
+			ct++;
 		}
 	}
 
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index ad6a3a7..2cc56d4 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -241,7 +241,7 @@ typedef struct Curve {
 	struct VFont *vfonti;
 	struct VFont *vfontbi;
 
-	int sepchar;
+	int pad4;
 	
 	float ctime;			/* current evaltime - for use by Objects parented to curves */
 	int totbox, actbox;




More information about the Bf-blender-cvs mailing list