From 42afb591844d71335eda0327d6e7c21342328482 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 11 Jan 2010 13:54:00 +0000 Subject: remove operators PARTICLE_OT_brush_set and PARTICLE_OT_edit_type_set, rna data access and menu's can replace --- source/blender/editors/physics/particle_edit.c | 73 ------------------------- source/blender/editors/physics/physics_intern.h | 1 - source/blender/editors/physics/physics_ops.c | 1 - 3 files changed, 75 deletions(-) (limited to 'source/blender/editors/physics') diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 8a73dc0e050..c510a28b7ad 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -2695,79 +2695,6 @@ void PARTICLE_OT_mirror(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -/*********************** set brush operator **********************/ - -static EnumPropertyItem brush_type_items[]= { - {PE_BRUSH_NONE, "NONE", 0, "None", ""}, - {PE_BRUSH_COMB, "COMB", 0, "Comb", ""}, - {PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", ""}, - {PE_BRUSH_ADD, "ADD", 0, "Add", ""}, - {PE_BRUSH_LENGTH, "LENGTH", 0, "Length", ""}, - {PE_BRUSH_PUFF, "PUFF", 0, "Puff", ""}, - {PE_BRUSH_CUT, "CUT", 0, "Cut", ""}, - {0, NULL, 0, NULL, NULL} -}; - -static int set_brush_exec(bContext *C, wmOperator *op) -{ - Scene *scene= CTX_data_scene(C); - ParticleEditSettings *pset= PE_settings(scene); - - pset->brushtype= RNA_enum_get(op->ptr, "type"); - - return OPERATOR_FINISHED; -} - -void PARTICLE_OT_brush_set(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Set Brush"; - ot->idname= "PARTICLE_OT_brush_set"; - - /* api callbacks */ - ot->exec= set_brush_exec; - ot->invoke= WM_menu_invoke; - ot->poll= PE_poll; - - /* properties */ - RNA_def_enum(ot->srna, "type", brush_type_items, PE_BRUSH_NONE, "Type", "Brush type to select for editing."); -} - - -/*********************** set mode operator **********************/ - -static EnumPropertyItem edit_type_items[]= { - {PE_TYPE_PARTICLES, "PARTICLES", 0, "Particles", ""}, - {PE_TYPE_SOFTBODY, "SOFTBODY", 0, "Soft body", ""}, - {PE_TYPE_CLOTH, "CLOTH", 0, "Cloth", ""}, - {0, NULL, 0, NULL, NULL} -}; - -static int set_edit_mode_exec(bContext *C, wmOperator *op) -{ - Scene *scene= CTX_data_scene(C); - ParticleEditSettings *pset= PE_settings(scene); - - pset->edittype= RNA_enum_get(op->ptr, "type"); - - return OPERATOR_FINISHED; -} - -void PARTICLE_OT_edit_type_set(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Set Edit Type"; - ot->idname= "PARTICLE_OT_edit_type_set"; - - /* api callbacks */ - ot->exec= set_edit_mode_exec; - ot->invoke= WM_menu_invoke; - ot->poll= PE_poll; - - /* properties */ - RNA_def_enum(ot->srna, "type", edit_type_items, PE_TYPE_PARTICLES, "Type", "Edit type to select for editing."); -} - /************************* brush edit callbacks ********************/ static void brush_comb(PEData *data, float mat[][4], float imat[][4], int point_index, int key_index, PTCacheEditKey *key) diff --git a/source/blender/editors/physics/physics_intern.h b/source/blender/editors/physics/physics_intern.h index e1b1a8b90a8..cc0a288f8be 100644 --- a/source/blender/editors/physics/physics_intern.h +++ b/source/blender/editors/physics/physics_intern.h @@ -53,7 +53,6 @@ void PARTICLE_OT_remove_doubles(struct wmOperatorType *ot); void PARTICLE_OT_delete(struct wmOperatorType *ot); void PARTICLE_OT_mirror(struct wmOperatorType *ot); -void PARTICLE_OT_brush_set(struct wmOperatorType *ot); void PARTICLE_OT_brush_edit(struct wmOperatorType *ot); void PARTICLE_OT_brush_radial_control(struct wmOperatorType *ot); diff --git a/source/blender/editors/physics/physics_ops.c b/source/blender/editors/physics/physics_ops.c index 24b3881d6b8..5cb8230e463 100644 --- a/source/blender/editors/physics/physics_ops.c +++ b/source/blender/editors/physics/physics_ops.c @@ -60,7 +60,6 @@ static void operatortypes_particle(void) WM_operatortype_append(PARTICLE_OT_delete); WM_operatortype_append(PARTICLE_OT_mirror); - WM_operatortype_append(PARTICLE_OT_brush_set); WM_operatortype_append(PARTICLE_OT_brush_edit); WM_operatortype_append(PARTICLE_OT_brush_radial_control); -- cgit v1.2.3