Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1226)

Unified Diff: source/blender/editors/physics/particle_edit.c

Issue 4280080: Radial control RNA update (Closed) Base URL: https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Patch Set: Removed brush image RNA function Created 12 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/blender/blenkernel/intern/brush.c ('k') | source/blender/editors/physics/physics_intern.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/blender/editors/physics/particle_edit.c
===================================================================
--- source/blender/editors/physics/particle_edit.c (revision 35974)
+++ source/blender/editors/physics/particle_edit.c (working copy)
@@ -2521,80 +2521,6 @@
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 };
« no previous file with comments | « source/blender/blenkernel/intern/brush.c ('k') | source/blender/editors/physics/physics_intern.h » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b