From 676d5d7b74e450f3777ec7f51698f4083812f591 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 27 Jun 2006 11:55:33 +0000 Subject: [PATCH] Fix for bug #4496 - Toolbox select menu in faceselect mode was calling object mode functions. --- source/blender/include/BSE_headerbuttons.h | 1 + source/blender/src/header_view3d.c | 4 +--- source/blender/src/toolbox.c | 13 ++++++++++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/source/blender/include/BSE_headerbuttons.h b/source/blender/include/BSE_headerbuttons.h index a5ded324105..50e4168ebd2 100644 --- a/source/blender/include/BSE_headerbuttons.h +++ b/source/blender/include/BSE_headerbuttons.h @@ -140,6 +140,7 @@ void do_view3d_select_object_groupedmenu(void *arg, int event); void do_view3d_select_object_linkedmenu(void *arg, int event); void do_view3d_select_object_layermenu(void *arg, int event); void do_view3d_select_object_typemenu(void *arg, int event); +void do_view3d_select_faceselmenu(void *arg, int event); void do_view3d_select_meshmenu(void *arg, int event); void do_view3d_select_curvemenu(void *arg, int event); void do_view3d_edit_snapmenu(void *arg, int event); diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c index 9a5352f401c..9960ba1f8f6 100644 --- a/source/blender/src/header_view3d.c +++ b/source/blender/src/header_view3d.c @@ -1209,10 +1209,8 @@ static uiBlock *view3d_select_pose_armaturemenu(void *arg_unused) return block; } -static void do_view3d_select_faceselmenu(void *arg, int event) +void do_view3d_select_faceselmenu(void *arg, int event) { -// extern void borderselect(void); - /* events >= 6 are registered bpython scripts */ if (event >= 6) BPY_menu_do_python(PYMENU_FACESELECT, event - 6); diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c index a690b20cf5c..1313dfc4a45 100644 --- a/source/blender/src/toolbox.c +++ b/source/blender/src/toolbox.c @@ -845,6 +845,16 @@ static TBitem tb_object_select[]= { { 0, "Grouped", 0, tb_object_select_grouped}, { -1, "", 0, do_view3d_select_objectmenu}}; +static TBitem tb_face_select[]= { +{ 0, "Border Select|B", 0, NULL}, +{ 0, "SEPR", 0, NULL}, +{ 0, "Select/Deselect All|A", 2, NULL}, +{ 0, "Inverse", 3, NULL}, +{ 0, "Same UV", 4, NULL}, +{ 0, "SEPR", 0, NULL}, +{ 0, "Linked Faces|Ctrl L", 5, NULL}, +{ -1, "", 0, do_view3d_select_faceselmenu}}; + static TBitem tb_mesh_select[]= { { 0, "Border Select|B", 0, NULL}, { 0, "SEPR", 0, NULL}, @@ -1845,7 +1855,8 @@ void toolbox_n(void) } } } - else { + else if (G.f & G_FACESELECT) { + menu3 = tb_face_select; } } else if(curarea->spacetype==SPACE_NODE) {