Revision: 23062
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23062
Author:   billrey
Date:     2009-09-08 13:31:15 +0200 (Tue, 08 Sep 2009)

Log Message:
-----------
Text UI

*Added Text Boxes panel, currently only shows the first textbox. Needs 
operators for adding/removing
*Added Bold/Italic/Underline items
*Cleaned up some font UI layout.

Modified Paths:
--------------
    branches/blender2.5/blender/release/ui/buttons_data_text.py
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_curve.c

Modified: branches/blender2.5/blender/release/ui/buttons_data_text.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data_text.py 2009-09-08 
11:14:36 UTC (rev 23061)
+++ branches/blender2.5/blender/release/ui/buttons_data_text.py 2009-09-08 
11:31:15 UTC (rev 23062)
@@ -38,7 +38,6 @@
                curve = context.curve
                space = context.space_data
 
-
                layout.itemR(curve, "curve_2d")                 
                                                        
                split = layout.split()
@@ -76,13 +75,15 @@
                col.itemL(text="Modification:")
                col.itemR(curve, "width")
                col.itemR(curve, "extrude")
-               col.itemR(curve, "taper_object")
+               col.itemL(text="Taper Object:")
+               col.itemR(curve, "taper_object", text="")
                
                col = split.column()
                col.itemL(text="Bevel:")
                col.itemR(curve, "bevel_depth", text="Depth")
                col.itemR(curve, "bevel_resolution", text="Resolution")
-               col.itemR(curve, "bevel_object")
+               col.itemL(text="Bevel Object:")
+               col.itemR(curve, "bevel_object", text="")
 
 class DATA_PT_font(DataButtonsPanel):
        __label__ = "Font"
@@ -91,27 +92,39 @@
                layout = self.layout
                
                text = context.curve
-
+               char = context.curve.edit_format
+               
                layout.itemR(text, "font")
                
+               row = layout.row()
+               row.itemR(text, "text_size", text="Size")       
+               row.itemR(text, "shear")
+                       
                split = layout.split()
                
-               col = split.column()    
-       #       col.itemR(text, "style")
-       #       col.itemR(text, "bold")
-       #       col.itemR(text, "italic")
-       #       col.itemR(text, "underline")
-       #       ToDo: These settings are in a sub struct (Edit Format). 
-               col.itemR(text, "text_size")            
-               col.itemR(text, "shear")
+               col = split.column()
+               col.itemL(text="Object Font:")
+               col.itemR(text, "family", text="")
+               
+               col = split.column()
+               col.itemL(text="Text on Curve:")
+               col.itemR(text, "text_on_curve", text="")
+               
+               split = layout.split()
+               
+               col = split.column()
+               col.itemL(text="Character:")
+               col.itemR(char, "bold")
+               col.itemR(char, "italic")
+               col.itemR(char, "underline")
+#              col.itemR(char, "style")
+#              col.itemR(char, "wrap")
 
-               col = split.column()
-               col.itemR(text, "text_on_curve")
-               col.itemR(text, "family")
+               col = split.column(align=True)
                col.itemL(text="Underline:")
                col.itemR(text, "ul_position", text="Position")
-               col.itemR(text, "ul_height", text="Height")
-       #       col.itemR(text, "edit_format")
+               col.itemR(text, "ul_height", text="Thickness")
+               
 
 class DATA_PT_paragraph(DataButtonsPanel):
        __label__ = "Paragraph"
@@ -136,21 +149,32 @@
                col.itemL(text="Offset:")
                col.itemR(text, "offset_x", text="X")
                col.itemR(text, "offset_y", text="Y")
-               #col.itemR(text, "wrap")
 
-"""            
+
 class DATA_PT_textboxes(DataButtonsPanel):
-               __label__ = "Text Boxes"
+       __label__ = "Text Boxes"
 
-               def draw(self, context):
-                       layout = self.layout
+       def draw(self, context):
+               layout = self.layout
                        
-                       text = context.curve
-"""
+               text = context.curve
+               box = context.curve.textbox
+               
+               split = layout.box().split()
+               
+               col = split.column(align=True)
+               col.itemL(text="Dimensions:")
+               col.itemR(box, "width", text="Width")
+               col.itemR(box, "height", text="Height")
+               
+               col = split.column(align=True)  
+               col.itemL(text="Offset:")
+               col.itemR(box, "x", text="X")
+               col.itemR(box, "y", text="Y")
 
 bpy.types.register(DATA_PT_context_text)       
 bpy.types.register(DATA_PT_shape_text) 
 bpy.types.register(DATA_PT_geometry_text)
 bpy.types.register(DATA_PT_font)
 bpy.types.register(DATA_PT_paragraph)
-#bpy.types.register(DATA_PT_textboxes)
+bpy.types.register(DATA_PT_textboxes)

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_curve.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_curve.c      
2009-09-08 11:14:36 UTC (rev 23061)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_curve.c      
2009-09-08 11:31:15 UTC (rev 23062)
@@ -500,13 +500,13 @@
        prop= RNA_def_property(srna, "ul_position", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "ulpos");
        RNA_def_property_range(prop, -0.2f, 0.8f);
-       RNA_def_property_ui_text(prop, "Underline position", "Vertical position 
of underline");
+       RNA_def_property_ui_text(prop, "Underline Position", "Vertical position 
of underline");
        RNA_def_property_update(prop, 0, "rna_Curve_update_data");
        
        prop= RNA_def_property(srna, "ul_height", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "ulheight");
        RNA_def_property_range(prop, -0.2f, 0.8f);
-       RNA_def_property_ui_text(prop, "Underline thickness", "");
+       RNA_def_property_ui_text(prop, "Underline Thickness", "");
        RNA_def_property_update(prop, 0, "rna_Curve_update_data");
        
        prop= RNA_def_property(srna, "active_textbox", PROP_INT, PROP_NONE);
@@ -518,7 +518,7 @@
        /* strings */
        prop= RNA_def_property(srna, "family", PROP_STRING, PROP_NONE);
        RNA_def_property_string_maxlength(prop, 21);
-       RNA_def_property_ui_text(prop, "Family", "Blender uses font from 
selfmade objects.");
+       RNA_def_property_ui_text(prop, "Object Font", "Use Blender Objects as 
font characters. Give font objects a common name followed by the character it 
represents, eg. familya, familyb etc, and turn on Verts Duplication");
        RNA_def_property_update(prop, 0, "rna_Curve_update_data");
        
        prop= RNA_def_property(srna, "str", PROP_STRING, PROP_NONE);


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to