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-18 10:35:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-18 10:40:52 +0300
commit987d1df57159afd57f33d7e58681be2fcdebda16 (patch)
treef782562c40bc1bf3fe23a455779f7e30d4cd8559 /source/blender/editors/mesh/editmesh_extrude.c
parent8faa59441371311a435b80487fe81eb60ea2e4fe (diff)
Tool System: store the active tool in ScrArea
Without this we need to have the context to get the (space_type, mode) args for an active tool lookup. For event handling & poll its more convenient to have direct access.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_extrude.c')
-rw-r--r--source/blender/editors/mesh/editmesh_extrude.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c
index 95bf8e89b0e..4841de3c856 100644
--- a/source/blender/editors/mesh/editmesh_extrude.c
+++ b/source/blender/editors/mesh/editmesh_extrude.c
@@ -419,9 +419,8 @@ 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);
- const bToolKey tkey = { .space_type = SPACE_VIEW3D, .mode = CTX_MODE_EDIT_MESH, };
- bToolRef_Runtime *tref_rt = WM_toolsystem_runtime_find(workspace, &tkey);
+ ScrArea *sa = CTX_wm_area(C);
+ bToolRef_Runtime *tref_rt = sa->runtime.tool ? sa->runtime.tool->runtime : NULL;
if ((tref_rt == NULL) ||
!STREQ(wgt->idname, tref_rt->manipulator_group) ||
!ED_operator_editmesh_view3d((bContext *)C))