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:
authorCampbell Barton <ideasman42@gmail.com>2018-05-16 19:41:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-17 16:57:33 +0300
commitedf6676a77b30290918e60547544bc1a6f7a8838 (patch)
tree26012f315c75686553e6be87b73ad270b98eb01a /source/blender/editors/mesh/editmesh_extrude.c
parent20cc14e2b7551bb043472174b8be79d8aaa4df3d (diff)
Tool System: per space/mode tool support
This patch adds support for: - Per space-type tools (3D view and edit). - Per mode tools (object, edit, weight-paint .. etc). The top-bar shows the last activated tools options, this is a design issue with using a global topbar to show per-space settings. See D3395
Diffstat (limited to 'source/blender/editors/mesh/editmesh_extrude.c')
-rw-r--r--source/blender/editors/mesh/editmesh_extrude.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c
index 2e3d0a9c675..67596ef5c8a 100644
--- a/source/blender/editors/mesh/editmesh_extrude.c
+++ b/source/blender/editors/mesh/editmesh_extrude.c
@@ -420,7 +420,10 @@ static void manipulator_mesh_extrude_orientation_matrix_set(
static bool manipulator_mesh_extrude_poll(const bContext *C, wmManipulatorGroupType *wgt)
{
WorkSpace *workspace = CTX_wm_workspace(C);
- if (!STREQ(workspace->tool.manipulator_group, "MESH_WGT_extrude") ||
+ const bToolKey tkey = { .space_type = SPACE_VIEW3D, .mode = OB_MODE_EDIT};
+ bToolRef_Runtime *tref_rt = WM_toolsystem_runtime_find(workspace, &tkey);
+ if ((tref_rt == NULL) ||
+ !STREQ(wgt->idname, tref_rt->manipulator_group) ||
!ED_operator_editmesh_view3d((bContext *)C))
{
WM_manipulator_group_type_unlink_delayed_ptr(wgt);