Revision: 20147
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20147
Author:   dingto
Date:     2009-05-11 13:31:10 +0200 (Mon, 11 May 2009)

Log Message:
-----------
2.5 RNA: Curve

* Changed the font align booleans into 1 enum. 

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_curve.c

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_curve.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_curve.c      
2009-05-11 08:40:50 UTC (rev 20146)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_curve.c      
2009-05-11 11:31:10 UTC (rev 20147)
@@ -291,6 +291,19 @@
 {
        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 @@
        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)


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to