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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-06-04 11:35:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-06-04 11:41:16 +0300
commit465a9f65de769d76cc950b674683a0903e36f31a (patch)
tree4fb27495cc0ca35e250b7af3d334ca5d5259d518 /source/blender/python
parent1a23b0be97934ef684e8362e6a888b54a70cef9b (diff)
Cleanup: remove window manager argument for paint cursor API
This caused an additional argument when exiting object modes and many other low level functions which don't need to access context. This simplifies fixing T77073.
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/intern/bpy_rna_callback.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/python/intern/bpy_rna_callback.c b/source/blender/python/intern/bpy_rna_callback.c
index cc9f5746bba..f9bcb8943f4 100644
--- a/source/blender/python/intern/bpy_rna_callback.c
+++ b/source/blender/python/intern/bpy_rna_callback.c
@@ -324,10 +324,8 @@ PyObject *pyrna_callback_classmethod_add(PyObject *UNUSED(self), PyObject *args)
return NULL;
}
- bContext *C = BPy_GetContext();
- struct wmWindowManager *wm = CTX_wm_manager(C);
handle = WM_paint_cursor_activate(
- wm, params.space_type, params.region_type, NULL, cb_wm_cursor_draw, (void *)args);
+ params.space_type, params.region_type, NULL, cb_wm_cursor_draw, (void *)args);
}
else if (RNA_struct_is_a(srna, &RNA_Space)) {
const char *error_prefix = "Space.draw_handler_add";
@@ -424,9 +422,7 @@ PyObject *pyrna_callback_classmethod_remove(PyObject *UNUSED(self), PyObject *ar
args, "OO!:WindowManager.draw_cursor_remove", &cls, &PyCapsule_Type, &py_handle)) {
return NULL;
}
- bContext *C = BPy_GetContext();
- struct wmWindowManager *wm = CTX_wm_manager(C);
- WM_paint_cursor_end(wm, handle);
+ WM_paint_cursor_end(handle);
capsule_clear = true;
}
else if (RNA_struct_is_a(srna, &RNA_Space)) {