Commit: f6d5212c3ae1f28ddd808b9175aa39986a87c12e
Author: Antony Riakiotakis
Date:   Sat Apr 5 20:30:47 2014 +0300
https://developer.blender.org/rBf6d5212c3ae1f28ddd808b9175aa39986a87c12e

Fix sculpt brushes stuck to drag dot or anchored mode

Was own mistake after RNA enu refactoring.

===================================================================

M       source/blender/makesrna/intern/rna_brush.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_brush.c 
b/source/blender/makesrna/intern/rna_brush.c
index 8b2c55a..9c81d58 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -49,13 +49,16 @@ static EnumPropertyItem prop_direction_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
-static EnumPropertyItem brush_stroke_method_items[] = {
+static EnumPropertyItem sculpt_stroke_method_items[] = {
        {0, "DOTS", 0, "Dots", "Apply paint on each mouse move step"},
+       {BRUSH_DRAG_DOT, "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_AIRBRUSH, "AIRBRUSH", 0, "Airbrush", "Keep applying paint effect 
while holding mouse (spray)"},
+    {BRUSH_ANCHORED, "ANCHORED", 0, "Anchored", "Keep the brush anchored to 
the initial location"},
        {0, NULL, 0, NULL, NULL}
 };
 
+
 EnumPropertyItem brush_sculpt_tool_items[] = {
        {SCULPT_TOOL_BLOB, "BLOB", ICON_BRUSH_BLOB, "Blob", ""},
        {SCULPT_TOOL_CLAY, "CLAY", ICON_BRUSH_CLAY, "Clay", ""},
@@ -475,17 +478,15 @@ static EnumPropertyItem 
*rna_Brush_direction_itemf(bContext *UNUSED(C), PointerR
 static EnumPropertyItem *rna_Brush_stroke_itemf(bContext *C, PointerRNA 
*UNUSED(ptr),
                                                 PropertyRNA *UNUSED(prop), 
bool *UNUSED(r_free))
 {
-       static EnumPropertyItem sculpt_stroke_method_items[] = {
+       PaintMode mode = BKE_paintmode_get_active_from_context(C);
+
+       static EnumPropertyItem brush_stroke_method_items[] = {
                {0, "DOTS", 0, "Dots", "Apply paint on each mouse move step"},
-               {BRUSH_DRAG_DOT, "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}
        };
 
-       PaintMode mode = BKE_paintmode_get_active_from_context(C);
-
        switch (mode) {
                case PAINT_SCULPT:
                        return sculpt_stroke_method_items;
@@ -706,7 +707,7 @@ static void rna_def_brush(BlenderRNA *brna)
 
        prop = RNA_def_property(srna, "stroke_method", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
-       RNA_def_property_enum_items(prop, brush_stroke_method_items);
+       RNA_def_property_enum_items(prop, sculpt_stroke_method_items);
        RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Brush_stroke_itemf");
        RNA_def_property_ui_text(prop, "Stroke Method", "");
        RNA_def_property_update(prop, 0, "rna_Brush_update");

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

Reply via email to