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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-10-22 04:03:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-10-22 04:03:41 +0300
commitcee35b2ca5d7685c47065c76e8b097ed6ad52cbb (patch)
treef3cab49f7ef5cb04b9b5d2764f355208e59c9915 /source
parentd6a43abc3a1319457ba9c204ec4cbc4f38010d1d (diff)
parent5a65305f8998a72c8bf39bc69414c7ba2da57055 (diff)
Merge branch 'blender-v2.91-release'
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/rna_wm_gizmo.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_wm_gizmo.c b/source/blender/makesrna/intern/rna_wm_gizmo.c
index 971991869e2..27d46e4d25b 100644
--- a/source/blender/makesrna/intern/rna_wm_gizmo.c
+++ b/source/blender/makesrna/intern/rna_wm_gizmo.c
@@ -61,6 +61,8 @@
# include "MEM_guardedalloc.h"
+# include "GPU_state.h"
+
# ifdef WITH_PYTHON
# include "BPY_extern.h"
# endif
@@ -84,6 +86,8 @@ static void rna_gizmo_draw_cb(const struct bContext *C, struct wmGizmo *gz)
RNA_parameter_set_lookup(&list, "context", &C);
gzgroup->type->rna_ext.call((bContext *)C, &gz_ptr, func, &list);
RNA_parameter_list_free(&list);
+ /* This callback may have called bgl functions. */
+ GPU_bgl_end();
}
static void rna_gizmo_draw_select_cb(const struct bContext *C, struct wmGizmo *gz, int select_id)
@@ -101,6 +105,8 @@ static void rna_gizmo_draw_select_cb(const struct bContext *C, struct wmGizmo *g
RNA_parameter_set_lookup(&list, "select_id", &select_id);
gzgroup->type->rna_ext.call((bContext *)C, &gz_ptr, func, &list);
RNA_parameter_list_free(&list);
+ /* This callback may have called bgl functions. */
+ GPU_bgl_end();
}
static int rna_gizmo_test_select_cb(struct bContext *C, struct wmGizmo *gz, const int location[2])