diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2018-05-24 11:23:03 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2018-05-24 11:23:03 +0300 |
commit | 3820237ddb737b08867b4ee2e4f69434b64d9681 (patch) | |
tree | d89c8c628c099dacd08558174ec1c1408587a37f /source/blender/editors/space_view3d | |
parent | 7762522ecda77790f0bfa80a11655af578c66d47 (diff) |
Workbench: in editmode the toggle xray option will be disabled
Z-Key was already taken by show hidden wires
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_header.c | 18 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_intern.h | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_ops.c | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index dd941dc281d..e0f3c412c56 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -225,7 +225,7 @@ void VIEW3D_OT_layers(wmOperatorType *ot) /** \name Toggle Bone selection Overlay Operator * \{ */ -static int toggle_show_see_through(bContext *C, wmOperator *UNUSED(op)) +static int toggle_show_xray(bContext *C, wmOperator *UNUSED(op)) { View3D *v3d = CTX_wm_view3d(C); v3d->shading.flag ^= V3D_SHADING_XRAY; @@ -234,9 +234,9 @@ static int toggle_show_see_through(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -static int toggle_show_see_through_poll(bContext *C) +static int toggle_show_xray_poll(bContext *C) { - bool result = (ED_operator_view3d_active(C) && !ED_operator_posemode(C)); + bool result = (ED_operator_view3d_active(C) && !ED_operator_posemode(C) && !ED_operator_editmesh(C)); if (result) { // Additional test for SOLID or TEXTURE mode View3D *v3d = CTX_wm_view3d(C); @@ -245,16 +245,16 @@ static int toggle_show_see_through_poll(bContext *C) return result; } -void VIEW3D_OT_toggle_see_through_draw_option(wmOperatorType *ot) +void VIEW3D_OT_toggle_xray_draw_option(wmOperatorType *ot) { /* identifiers */ - ot->name = "Toggle Show See Though"; - ot->description = "Toggle show see through"; - ot->idname = "VIEW3D_OT_toggle_see_through_draw_option"; + ot->name = "Toggle Show X-Ray"; + ot->description = "Toggle show X-Ray"; + ot->idname = "VIEW3D_OT_toggle_xray_draw_option"; /* api callbacks */ - ot->exec = toggle_show_see_through; - ot->poll = toggle_show_see_through_poll; + ot->exec = toggle_show_xray; + ot->poll = toggle_show_xray_poll; } /** \} */ diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index 794ca0dcad9..ec9d5ba0e83 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -65,7 +65,7 @@ enum { /* view3d_header.c */ void VIEW3D_OT_layers(struct wmOperatorType *ot); -void VIEW3D_OT_toggle_see_through_draw_option(struct wmOperatorType *ot); +void VIEW3D_OT_toggle_xray_draw_option(struct wmOperatorType *ot); /* view3d_ops.c */ void view3d_operatortypes(void); diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c index dd168c26f07..26efdc4123c 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -222,7 +222,7 @@ void view3d_operatortypes(void) WM_operatortype_append(VIEW3D_OT_snap_cursor_to_active); WM_operatortype_append(VIEW3D_OT_toggle_render); - WM_operatortype_append(VIEW3D_OT_toggle_see_through_draw_option); + WM_operatortype_append(VIEW3D_OT_toggle_xray_draw_option); WM_operatortype_append(VIEW3D_OT_ruler_add); @@ -409,7 +409,7 @@ void view3d_keymap(wmKeyConfig *keyconf) RNA_string_set(kmi->ptr, "value_2", "TEXTURED"); WM_keymap_add_item(keymap, "VIEW3D_OT_toggle_render", ZKEY, KM_PRESS, KM_SHIFT, 0); - WM_keymap_add_item(keymap, "VIEW3D_OT_toggle_see_through_draw_option", ZKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "VIEW3D_OT_toggle_xray_draw_option", ZKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", ZKEY, KM_PRESS, 0, 0); RNA_string_set(kmi->ptr, "data_path", "space_data.use_occlude_geometry"); |