diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-28 13:25:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-28 13:26:33 +0300 |
commit | d2851b78f09995e68d4ca97b5cd98d569b605d77 (patch) | |
tree | 7e7fc3c45352e031fcf86c621454cd5de31ce2d2 /source/blender/editors/transform | |
parent | fddfc416ef10fc71a28f20bc0cef0a9e522de985 (diff) |
Manipulator: regression from removing keymaps
Keymaps were used to check which tool was active.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform_manipulator_3d.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/editors/transform/transform_manipulator_3d.c b/source/blender/editors/transform/transform_manipulator_3d.c index ccf6cc8c7ce..f584a7cf623 100644 --- a/source/blender/editors/transform/transform_manipulator_3d.c +++ b/source/blender/editors/transform/transform_manipulator_3d.c @@ -1413,23 +1413,20 @@ static void WIDGETGROUP_manipulator_setup(const bContext *C, wmManipulatorGroup { man->twtype = 0; ScrArea *sa = CTX_wm_area(C); - bToolRef_Runtime *tref_rt = sa->runtime.tool ? sa->runtime.tool->runtime : NULL; - wmKeyMap *km = tref_rt ? WM_keymap_find_all(C, tref_rt->keymap, sa->spacetype, RGN_TYPE_WINDOW) : NULL; - /* Weak, check first event */ - wmKeyMapItem *kmi = km ? km->items.first : NULL; + const bToolRef *tref = sa->runtime.tool; - if (kmi == NULL) { + if (tref == NULL || STREQ(tref->idname, "Transform")) { /* Setup all manipulators, they can be toggled via 'ToolSettings.manipulator_flag' */ man->twtype = SCE_MANIP_TRANSLATE | SCE_MANIP_ROTATE | SCE_MANIP_SCALE; man->use_twtype_refresh = true; } - else if (STREQ(kmi->idname, "TRANSFORM_OT_translate")) { + else if (STREQ(tref->idname, "Move")) { man->twtype |= SCE_MANIP_TRANSLATE; } - else if (STREQ(kmi->idname, "TRANSFORM_OT_rotate")) { + else if (STREQ(tref->idname, "Rotate")) { man->twtype |= SCE_MANIP_ROTATE; } - else if (STREQ(kmi->idname, "TRANSFORM_OT_resize")) { + else if (STREQ(tref->idname, "Scale")) { man->twtype |= SCE_MANIP_SCALE; } BLI_assert(man->twtype != 0); |