Revision: 39023
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39023
Author:   psy-fi
Date:     2011-08-04 14:19:24 +0000 (Thu, 04 Aug 2011)
Log Message:
-----------
smooth brush
============
-renaming of operator for consistency
-add radial control(Very easy indeed, thanks for the nice API Jason Wilkins!)

Modified Paths:
--------------
    branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_ops.c

Modified: 
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_ops.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_ops.c     
2011-08-04 14:13:05 UTC (rev 39022)
+++ branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_ops.c     
2011-08-04 14:19:24 UTC (rev 39023)
@@ -365,15 +365,16 @@
        return OPERATOR_FINISHED;
 }
 
-static void UV_OT_uv_smooth_stroke(wmOperatorType *ot)
+static void PAINT_OT_uv_smooth_stroke(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Smooth UVs";
        ot->description= "Smooth UVs using a brush";
-       ot->idname= "UV_OT_uv_smooth_stroke";
+       ot->idname= "PAINT_OT_uv_smooth_stroke";
 
        /* api callbacks */
        ot->exec= uv_smooth_stroke_exec;
+       ot->modal=paint_stroke_modal;
        ot->poll= uv_smooth_poll;
 
        /* flags */
@@ -418,7 +419,7 @@
        WM_operatortype_append(PAINT_OT_weight_layers_to_uv_images);
 
        /* uv */
-       WM_operatortype_append(UV_OT_uv_smooth_stroke);
+       WM_operatortype_append(PAINT_OT_uv_smooth_stroke);
 
        /* vertex */
        WM_operatortype_append(PAINT_OT_vertex_paint_toggle);
@@ -709,12 +710,16 @@
        keymap= WM_keymap_find(keyconf, "UV Smooth", 0, 0);
        keymap->poll= uv_smooth_poll;
 
-       WM_keymap_add_item(keymap, "UV_OT_uv_smooth_stroke", LEFTMOUSE, 
KM_PRESS, 0, 0);
+       WM_keymap_add_item(keymap, "PAINT_OT_uv_smooth_stroke", LEFTMOUSE, 
KM_PRESS, 0, 0);
 
+       ed_keymap_paint_brush_size(keymap, 
"tool_settings.image_paint.brush.size");
+       ed_keymap_paint_brush_radial_control(keymap, "image_paint", 
RC_COLOR|RC_ZOOM, 0);
+
        /* paint stroke */
        {
                wmKeyMap* keymap= paint_stroke_modal_keymap(keyconf);
                WM_modalkeymap_assign(keymap, "SCULPT_OT_sculpt_stroke");
                WM_modalkeymap_assign(keymap, "PAINT_OT_vpaint_stroke");
+               WM_modalkeymap_assign(keymap, "PAINT_OT_uv_smooth_stroke");
        }
 }

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

Reply via email to