- Description of texture angle sources and stroke methods
authorSergey Sharybin <sergey.vfx@gmail.com>
Sun, 1 May 2011 08:50:09 +0000 (08:50 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sun, 1 May 2011 08:50:09 +0000 (08:50 +0000)
- Fixed bug with empty tooltip for some ENUMs

source/blender/editors/interface/interface_regions.c
source/blender/makesrna/intern/rna_brush.c

index 0e951eb15c7f569f92c372ab9e1c67ab036ce77c..aa5499110e6082e3ffdcbbcdf7ae3c4e324fa2d3 100644 (file)
@@ -365,7 +365,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
        /* special case, enum rna buttons only have enum item description, use general enum description too before the spesific one */
        if(but->rnaprop && RNA_property_type(but->rnaprop) == PROP_ENUM) {
                const char *descr= RNA_property_description(but->rnaprop);
-               if(descr) {
+               if(descr && descr[0]) {
                        BLI_strncpy(data->lines[data->totline], descr, sizeof(data->lines[0]));
                        data->color[data->totline]= 0xFFFFFF;
                        data->totline++;
index f3f79cde6172d144ddbfe9547b4ab2c5a1b3c144..7bb56380ba511aa62a4fc152c4af0375217f15c8 100644 (file)
@@ -342,22 +342,22 @@ static void rna_def_brush(BlenderRNA *brna)
                {0, NULL, 0, NULL, NULL}};
        
        static EnumPropertyItem brush_stroke_method_items[] = {
-               {0, "DOTS", 0, "Dots", ""},
-               {BRUSH_RESTORE_MESH, "DRAG_DOT", 0, "Drag Dot", ""},
-               {BRUSH_SPACE, "SPACE", 0, "Space", ""},
-               {BRUSH_ANCHORED, "ANCHORED", 0, "Anchored", ""},
-               {BRUSH_AIRBRUSH, "AIRBRUSH", 0, "Airbrush", ""},
+               {0, "DOTS", 0, "Dots", "Apply paint on each mouse move step"},
+               {BRUSH_RESTORE_MESH, "DRAG_DOT", 0, "Drag Dot", "Allows a single dot to be carefully positioned"},
+               {BRUSH_SPACE, "SPACE", 0, "Space", "Limit brush application to the distance specified by spacing"},
+               {BRUSH_ANCHORED, "ANCHORED", 0, "Anchored", "Keep the brush anchored to the initial location"},
+               {BRUSH_AIRBRUSH, "AIRBRUSH", 0, "Airbrush", "Keep applying paint effect while holding mouse (spray)"},
                {0, NULL, 0, NULL, NULL}};
 
        static EnumPropertyItem texture_angle_source_items[] = {
-               {0, "USER", 0, "User", ""},
-               {BRUSH_RAKE, "RAKE", 0, "Rake", ""},
-               {BRUSH_RANDOM_ROTATION, "RANDOM", 0, "Random", ""},
+               {0, "USER", 0, "User", "Rotate the brush texture by given angle"},
+               {BRUSH_RAKE, "RAKE", 0, "Rake", "Rotate the brush texture to match the stroke direction"},
+               {BRUSH_RANDOM_ROTATION, "RANDOM", 0, "Random", "Rotate the brush texture at random"},
                {0, NULL, 0, NULL, NULL}};
 
        static EnumPropertyItem texture_angle_source_no_random_items[] = {
-               {0, "USER", 0, "User", ""},
-               {BRUSH_RAKE, "RAKE", 0, "Rake", ""},
+               {0, "USER", 0, "User", "Rotate the brush texture by given angle"},
+               {BRUSH_RAKE, "RAKE", 0, "Rake", "Rotate the brush texture to match the stroke direction"},
                {0, NULL, 0, NULL, NULL}};
 
        static EnumPropertyItem brush_sculpt_plane_items[] = {