Text3d: remove sepchar, old feature which no longer has any UI access.
authorCampbell Barton <ideasman42@gmail.com>
Sun, 5 Jan 2014 09:15:39 +0000 (20:15 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 5 Jan 2014 10:15:24 +0000 (21:15 +1100)
source/blender/blenkernel/intern/font.c
source/blender/makesdna/DNA_curve_types.h

index 0fddce5a9b366d1bf68f9e03ad769a0c89f1b826..59061c28f57840d6a120d763b6df082ac5c4c780 100644 (file)
@@ -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++;
                }
        }
 
index ad6a3a77413c3f8b57809f183c5fecb06fb12a2a..2cc56d49ff8b2922152dbeee727cf158b091d9ff 100644 (file)
@@ -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;