Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/physics/particle_edit.c')
-rw-r--r--source/blender/editors/physics/particle_edit.c74
1 files changed, 0 insertions, 74 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 1c9f9e60e14..733919ff166 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -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 };