[Bf-blender-cvs] [994dd5c] master: Cleanup: rename curve align-x flags
Campbell Barton
noreply at git.blender.org
Tue Jun 21 04:40:54 CEST 2016
Commit: 994dd5c7c151d42d81f20a7aebaa7dee33814089
Author: Campbell Barton
Date: Tue Jun 21 12:44:49 2016 +1000
Branches: master
https://developer.blender.org/rB994dd5c7c151d42d81f20a7aebaa7dee33814089
Cleanup: rename curve align-x flags
===================================================================
M source/blender/blenkernel/intern/font.c
M source/blender/makesdna/DNA_curve_types.h
M source/blender/makesrna/intern/rna_curve.c
===================================================================
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index b408893..812d1c6 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -911,10 +911,10 @@ makebreak:
/* linedata is now: width of line */
- if (cu->spacemode != CU_LEFT) {
+ if (cu->spacemode != CU_ALIGN_X_LEFT) {
ct = chartransdata;
- if (cu->spacemode == CU_RIGHT) {
+ if (cu->spacemode == CU_ALIGN_X_RIGHT) {
struct TempLineInfo *li;
for (i = 0, li = lineinfo; i < lnr; i++, li++) {
@@ -926,7 +926,7 @@ makebreak:
ct++;
}
}
- else if (cu->spacemode == CU_MIDDLE) {
+ else if (cu->spacemode == CU_ALIGN_X_MIDDLE) {
struct TempLineInfo *li;
for (i = 0, li = lineinfo; i < lnr; i++, li++) {
@@ -938,7 +938,7 @@ makebreak:
ct++;
}
}
- else if ((cu->spacemode == CU_FLUSH) && use_textbox) {
+ else if ((cu->spacemode == CU_ALIGN_X_FLUSH) && use_textbox) {
struct TempLineInfo *li;
for (i = 0, li = lineinfo; i < lnr; i++, li++) {
@@ -959,7 +959,7 @@ makebreak:
ct++;
}
}
- else if ((cu->spacemode == CU_JUSTIFY) && use_textbox) {
+ else if ((cu->spacemode == CU_ALIGN_X_JUSTIFY) && use_textbox) {
float curofs = 0.0f;
for (i = 0; i <= slen; i++) {
for (j = i;
@@ -1078,13 +1078,13 @@ makebreak:
/* path longer than text: spacemode involves */
distfac = 1.0f / distfac;
- if (cu->spacemode == CU_RIGHT) {
+ if (cu->spacemode == CU_ALIGN_X_RIGHT) {
timeofs = 1.0f - distfac;
}
- else if (cu->spacemode == CU_MIDDLE) {
+ else if (cu->spacemode == CU_ALIGN_X_MIDDLE) {
timeofs = (1.0f - distfac) / 2.0f;
}
- else if (cu->spacemode == CU_FLUSH) {
+ else if (cu->spacemode == CU_ALIGN_X_FLUSH) {
distfac = 1.0f;
}
}
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index 6d13995..61169e4 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -322,11 +322,11 @@ enum {
/* Curve.spacemode */
enum {
- CU_LEFT = 0,
- CU_MIDDLE = 1,
- CU_RIGHT = 2,
- CU_JUSTIFY = 3,
- CU_FLUSH = 4,
+ CU_ALIGN_X_LEFT = 0,
+ CU_ALIGN_X_MIDDLE = 1,
+ CU_ALIGN_X_RIGHT = 2,
+ CU_ALIGN_X_JUSTIFY = 3,
+ CU_ALIGN_X_FLUSH = 4,
};
/* Curve.align_y */
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index b18fbf9..fb4ff6f 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -954,11 +954,11 @@ static void rna_def_font(BlenderRNA *UNUSED(brna), StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem prop_align_items[] = {
- {CU_LEFT, "LEFT", 0, "Left", "Align text to the left"},
- {CU_MIDDLE, "CENTER", 0, "Center", "Center text"},
- {CU_RIGHT, "RIGHT", 0, "Right", "Align text to the right"},
- {CU_JUSTIFY, "JUSTIFY", 0, "Justify", "Align to the left and the right"},
- {CU_FLUSH, "FLUSH", 0, "Flush", "Align to the left and the right, with equal character spacing"},
+ {CU_ALIGN_X_LEFT, "LEFT", 0, "Left", "Align text to the left"},
+ {CU_ALIGN_X_MIDDLE, "CENTER", 0, "Center", "Center text"},
+ {CU_ALIGN_X_RIGHT, "RIGHT", 0, "Right", "Align text to the right"},
+ {CU_ALIGN_X_JUSTIFY, "JUSTIFY", 0, "Justify", "Align to the left and the right"},
+ {CU_ALIGN_X_FLUSH, "FLUSH", 0, "Flush", "Align to the left and the right, with equal character spacing"},
{0, NULL, 0, NULL, NULL}
};
More information about the Bf-blender-cvs
mailing list