svn merge -r36603:36628 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / blender / editors / physics / particle_edit.c
index 1d235f83186ac37fd70df7d72cae12f3e7387839..ee39e0fff2698ebe08b4c93a9362f49873828c14 100644 (file)
@@ -2521,80 +2521,6 @@ static void toggle_particle_cursor(bContext *C, int enable)
                pset->paintcursor= WM_paint_cursor_activate(CTX_wm_manager(C), PE_poll_view3d, brush_drawcursor, NULL);
 }
 
-/********************* radial control operator *********************/
-
-static int brush_radial_control_invoke(bContext *C, wmOperator *op, wmEvent *event)
-{
-       ParticleEditSettings *pset= PE_settings(CTX_data_scene(C));
-       ParticleBrushData *brush;
-       int mode = RNA_enum_get(op->ptr, "mode");
-       float original_value=1.0f;
-
-       if(pset->brushtype < 0)
-               return OPERATOR_CANCELLED;
-
-       brush= &pset->brush[pset->brushtype];
-
-       toggle_particle_cursor(C, 0);
-
-       if(mode == WM_RADIALCONTROL_SIZE)
-               original_value = brush->size;
-       else if(mode == WM_RADIALCONTROL_STRENGTH)
-               original_value = brush->strength;
-
-       RNA_float_set(op->ptr, "initial_value", original_value);
-
-       return WM_radial_control_invoke(C, op, event);
-}
-
-static int brush_radial_control_modal(bContext *C, wmOperator *op, wmEvent *event)
-{
-       int ret = WM_radial_control_modal(C, op, event);
-
-       if(ret != OPERATOR_RUNNING_MODAL)
-               toggle_particle_cursor(C, 1);
-
-       return ret;
-}
-
-static int brush_radial_control_exec(bContext *C, wmOperator *op)
-{
-       ParticleEditSettings *pset= PE_settings(CTX_data_scene(C));
-       ParticleBrushData *brush;
-       int mode = RNA_enum_get(op->ptr, "mode");
-       float new_value = RNA_float_get(op->ptr, "new_value");
-
-       if(pset->brushtype < 0)
-               return OPERATOR_CANCELLED;
-
-       brush= &pset->brush[pset->brushtype];
-
-       if(mode == WM_RADIALCONTROL_SIZE)
-               brush->size= new_value;
-       else if(mode == WM_RADIALCONTROL_STRENGTH)
-               brush->strength= new_value;
-
-       WM_event_add_notifier(C, NC_WINDOW, NULL);
-
-       return OPERATOR_FINISHED;
-}
-
-void PARTICLE_OT_brush_radial_control(wmOperatorType *ot)
-{
-       WM_OT_radial_control_partial(ot);
-
-       ot->name= "Brush Radial Control";
-       ot->idname= "PARTICLE_OT_brush_radial_control";
-
-       ot->invoke= brush_radial_control_invoke;
-       ot->modal= brush_radial_control_modal;
-       ot->exec= brush_radial_control_exec;
-       ot->poll= PE_poll;
-       
-       /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
-}
-
 /*************************** delete operator **************************/
 
 enum { DEL_PARTICLE, DEL_KEY };