[Bf-blender-cvs] [f226687bb96] master: Cleanup: Knife Tool: Remove redundant 'view3d_operator_needs_opengl' calls

Germano Cavalcante noreply at git.blender.org
Mon Jan 25 14:11:41 CET 2021


Commit: f226687bb963f54e47d56bca5c1ff00555fc09b6
Author: Germano Cavalcante
Date:   Mon Jan 25 10:07:36 2021 -0300
Branches: master
https://developer.blender.org/rBf226687bb963f54e47d56bca5c1ff00555fc09b6

Cleanup: Knife Tool: Remove redundant 'view3d_operator_needs_opengl' calls

This function sets the `RegionView3D` matrices to the GPU.
But the OpenGL library is not actually being used by the operator.

===================================================================

M	source/blender/editors/mesh/editmesh_knife.c

===================================================================

diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index 2374ff1a7d8..379140a821a 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -2752,8 +2752,6 @@ static int knifetool_invoke(bContext *C, wmOperator *op, const wmEvent *event)
     }
   }
 
-  view3d_operator_needs_opengl(C);
-
   /* alloc new customdata */
   kcd = op->customdata = MEM_callocN(sizeof(KnifeTool_OpData), __func__);
 
@@ -2831,7 +2829,6 @@ static int knifetool_modal(bContext *C, wmOperator *op, const wmEvent *event)
   em_setup_viewcontext(C, &kcd->vc);
   kcd->region = kcd->vc.region;
 
-  view3d_operator_needs_opengl(C);
   ED_view3d_init_mats_rv3d(obedit, kcd->vc.rv3d); /* needed to initialize clipping */
 
   if (kcd->mode == MODE_PANNING) {



More information about the Bf-blender-cvs mailing list