diff options
Diffstat (limited to 'source/blender/editors/mesh/editmesh_knife.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 6230eacba94..5f5599b53df 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -1162,6 +1162,7 @@ static void knifetool_draw(const bContext *UNUSED(C), ARegion *UNUSED(region), v rgba_uchar_to_float(fcol, kcd->colors.point_a); GPU_batch_uniform_4fv(batch, "color", fcol); GPU_matrix_bind(batch->interface); + GPU_shader_set_srgb_uniform(batch->interface); GPU_point_size(11); if (snapped_verts_count > 0) { GPU_batch_draw_advanced(batch, 0, snapped_verts_count, 0, 0); @@ -1579,7 +1580,7 @@ static void knife_find_line_hits(KnifeTool_OpData *kcd) float line_tol, line_tol_sq; float face_tol, face_tol_sq; int isect_kind; - unsigned int tot; + uint tot; int i; const bool use_hit_prev = true; const bool use_hit_curr = (kcd->is_drag_hold == false); @@ -2419,7 +2420,7 @@ static void knife_make_face_cuts(KnifeTool_OpData *kcd, BMFace *f, ListBase *kfe edge_array_len = i; #ifdef USE_NET_ISLAND_CONNECT - unsigned int edge_array_holes_len; + uint edge_array_holes_len; BMEdge **edge_array_holes; if (BM_face_split_edgenet_connect_islands(bm, f, @@ -2824,14 +2825,14 @@ wmKeyMap *knifetool_modal_keymap(wmKeyConfig *keyconf) {0, NULL, 0, NULL, NULL}, }; - wmKeyMap *keymap = WM_modalkeymap_get(keyconf, "Knife Tool Modal Map"); + wmKeyMap *keymap = WM_modalkeymap_find(keyconf, "Knife Tool Modal Map"); /* this function is called for each spacetype, only needs to add map once */ if (keymap && keymap->modal_items) { return NULL; } - keymap = WM_modalkeymap_add(keyconf, "Knife Tool Modal Map", modal_items); + keymap = WM_modalkeymap_ensure(keyconf, "Knife Tool Modal Map", modal_items); WM_modalkeymap_assign(keymap, "MESH_OT_knife_tool"); @@ -2997,6 +2998,7 @@ static int knifetool_modal(bContext *C, wmOperator *op, const wmEvent *event) case MOUSEROTATE: case WHEELUPMOUSE: case WHEELDOWNMOUSE: + case NDOF_MOTION: return OPERATOR_PASS_THROUGH; case MOUSEMOVE: /* mouse moved somewhere to select another loop */ if (kcd->mode != MODE_PANNING) { |