diff options
author | Antonioya <blendergit@gmail.com> | 2019-07-06 00:11:53 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-07-06 00:52:26 +0300 |
commit | a0f3ea7da3f65333fbac9c2d528c4242c417860d (patch) | |
tree | d6004f828aba6d51eb1ace911f8d8be7c0fdea96 /source/blender/draw/intern | |
parent | a7a9c0e50dc9b96d84e1e7cf18d26b3ef5679aa5 (diff) |
Fix T62101: GPencil: selection order is wrong
Following the advices of @Germano Cavalcante (mano-wii) , I have exposed as a workaround the free function to be called from draw manager for selection.
Now, the free function is not called for selection inside gpencil draw_scene, but it's called from draw_manager.c.
The real fix would be create a new Scene_finish callback in draw manager, but as the release of 2.80 is almost here, we fix this with a workaround that must be removed when new callback is in place.
Differential Revision: http://developer.blender.org/D5193
Diffstat (limited to 'source/blender/draw/intern')
-rw-r--r-- | source/blender/draw/intern/draw_manager.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index bab38cf0a9f..2a241264988 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -88,6 +88,7 @@ #include "engines/basic/basic_engine.h" #include "engines/workbench/workbench_engine.h" #include "engines/external/external_engine.h" +#include "engines/gpencil/gpencil_engine.h" #include "GPU_context.h" @@ -2379,6 +2380,13 @@ void DRW_draw_select_loop(struct Depsgraph *depsgraph, } } + /* TODO: GPXX Workaround for grease pencil selection while draw manager support a callback from + * scene finish */ + void *data = GPU_viewport_engine_data_get(DST.viewport, &draw_engine_gpencil_type); + if (data != NULL) { + DRW_gpencil_free_runtime_data(data); + } + DRW_state_lock(0); DRW_draw_callbacks_post_scene(); |