2.5 RNA: Curve
* Changed the font align booleans into 1 enum.
This commit is contained in:
@@ -291,6 +291,19 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
|
||||
{
|
||||
PropertyRNA *prop;
|
||||
|
||||
static EnumPropertyItem prop_align_items[] = {
|
||||
{CU_LEFT, "LEFT", "Left Align", "Align text to the left"},
|
||||
{CU_MIDDLE, "CENTRAL", "Central Align", "Center text"},
|
||||
{CU_RIGHT, "RIGHT", "Right Align", "Align text to the right"},
|
||||
{CU_JUSTIFY, "JUSTIFY", "Justify", "Align to the left and the right"},
|
||||
{CU_FLUSH, "FLUSH", "Flush", "Align to the left and the right, with equal character spacing"},
|
||||
{0, NULL, NULL, NULL}};
|
||||
|
||||
/* Enums */
|
||||
prop= RNA_def_property(srna, "spacemode", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_items(prop, prop_align_items);
|
||||
RNA_def_property_ui_text(prop, "Text Align", "Text align from the object center.");
|
||||
|
||||
/* number values */
|
||||
prop= RNA_def_property(srna, "text_size", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "fsize");
|
||||
@@ -375,26 +388,6 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
|
||||
prop= RNA_def_property(srna, "fast", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_FAST);
|
||||
RNA_def_property_ui_text(prop, "Fast", "Don't fill polygons while editing.");
|
||||
|
||||
prop= RNA_def_property(srna, "left_align", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "spacemode", CU_LEFT);
|
||||
RNA_def_property_ui_text(prop, "Left Align", "Left align the text from the object center.");
|
||||
|
||||
prop= RNA_def_property(srna, "middle_align", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "spacemode", CU_MIDDLE);
|
||||
RNA_def_property_ui_text(prop, "Middle Align", "Middle align the text from the object center.");
|
||||
|
||||
prop= RNA_def_property(srna, "right_align", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "spacemode", CU_RIGHT);
|
||||
RNA_def_property_ui_text(prop, "Right Align", "Right align the text from the object center.");
|
||||
|
||||
prop= RNA_def_property(srna, "justify", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "spacemode", CU_JUSTIFY);
|
||||
RNA_def_property_ui_text(prop, "Justify", "Fill complete lines to maximum textframe width.");
|
||||
|
||||
prop= RNA_def_property(srna, "flush", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "spacemode", CU_FLUSH);
|
||||
RNA_def_property_ui_text(prop, "Left Align", "Fill every line to maximum textframe width distributing space among all characters.");
|
||||
}
|
||||
|
||||
void rna_def_textbox(BlenderRNA *brna)
|
||||
|
||||
Reference in New Issue
Block a user