diff options
author | Matt Ebb <matt@mke3.net> | 2009-12-24 13:39:30 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2009-12-24 13:39:30 +0300 |
commit | 73c62183f80d129cad61f21ec0fe16d5bbec873d (patch) | |
tree | 881c2bbdfc063399a88f3b287873ee4cadbbc041 /source/blender/editors/physics | |
parent | accfa71b2cd95dbaa09172780d93b27b9eef403b (diff) |
Removed a few operators that were just used to generate popup menus and replaced with python defined menus.
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 36 | ||||
-rw-r--r-- | source/blender/editors/physics/physics_intern.h | 2 | ||||
-rw-r--r-- | source/blender/editors/physics/physics_ops.c | 4 |
3 files changed, 1 insertions, 41 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 8bacad3c132..c29214f4633 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -4035,39 +4035,3 @@ void PARTICLE_OT_edited_clear(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -/*********************** specials menu **************************/ - -static int specials_menu_invoke(bContext *C, wmOperator *op, wmEvent *event) -{ - Scene *scene= CTX_data_scene(C); - ParticleEditSettings *pset=PE_settings(scene); - uiPopupMenu *pup; - uiLayout *layout; - - pup= uiPupMenuBegin(C, "Specials", 0); - layout= uiPupMenuLayout(pup); - - uiItemO(layout, NULL, 0, "PARTICLE_OT_rekey"); - if(pset->selectmode & SCE_SELECT_POINT) { - uiItemO(layout, NULL, 0, "PARTICLE_OT_subdivide"); - uiItemO(layout, NULL, 0, "PARTICLE_OT_select_first"); - uiItemO(layout, NULL, 0, "PARTICLE_OT_select_last"); - } - uiItemO(layout, NULL, 0, "PARTICLE_OT_remove_doubles"); - - uiPupMenuEnd(C, pup); - - return OPERATOR_CANCELLED; -} - -void PARTICLE_OT_specials_menu(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Specials Menu"; - ot->idname= "PARTICLE_OT_specials_menu"; - - /* api callbacks */ - ot->invoke= specials_menu_invoke; - ot->poll= PE_hair_poll; -} - diff --git a/source/blender/editors/physics/physics_intern.h b/source/blender/editors/physics/physics_intern.h index 085332b1788..e1b1a8b90a8 100644 --- a/source/blender/editors/physics/physics_intern.h +++ b/source/blender/editors/physics/physics_intern.h @@ -57,8 +57,6 @@ 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); -void PARTICLE_OT_specials_menu(struct wmOperatorType *ot); - void PARTICLE_OT_particle_edit_toggle(struct wmOperatorType *ot); void PARTICLE_OT_edited_clear(struct wmOperatorType *ot); diff --git a/source/blender/editors/physics/physics_ops.c b/source/blender/editors/physics/physics_ops.c index 09b4ebec7a2..24b3881d6b8 100644 --- a/source/blender/editors/physics/physics_ops.c +++ b/source/blender/editors/physics/physics_ops.c @@ -64,8 +64,6 @@ static void operatortypes_particle(void) WM_operatortype_append(PARTICLE_OT_brush_edit); WM_operatortype_append(PARTICLE_OT_brush_radial_control); - WM_operatortype_append(PARTICLE_OT_specials_menu); - WM_operatortype_append(PARTICLE_OT_particle_edit_toggle); WM_operatortype_append(PARTICLE_OT_edited_clear); @@ -113,7 +111,7 @@ static void keymap_particle(wmKeyConfig *keyconf) RNA_enum_set(WM_keymap_add_item(keymap, "PARTICLE_OT_brush_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE); RNA_enum_set(WM_keymap_add_item(keymap, "PARTICLE_OT_brush_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH); - WM_keymap_add_item(keymap, "PARTICLE_OT_specials_menu", WKEY, KM_PRESS, 0, 0); + WM_keymap_add_menu(keymap, "VIEW3D_MT_particle_specials", WKEY, KM_PRESS, 0, 0); ED_object_generic_keymap(keyconf, keymap, 1); } |