[Bf-blender-cvs] [89bb36edc6b] greasepencil-object: Merge branch 'master' into greasepencil-object
Antonioya
noreply at git.blender.org
Fri Mar 1 20:55:28 CET 2019
Commit: 89bb36edc6b60ac1dc57aa15f04d9e8055fd1f02
Author: Antonioya
Date: Fri Mar 1 20:55:19 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rB89bb36edc6b60ac1dc57aa15f04d9e8055fd1f02
Merge branch 'master' into greasepencil-object
Conflicts:
source/blender/draw/engines/gpencil/gpencil_engine.c
===================================================================
===================================================================
diff --cc source/blender/draw/engines/gpencil/gpencil_engine.c
index d9ee2b26b50,d5d5c1e604d..4a1abc8005b
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@@ -761,11 -759,10 +759,51 @@@ static void gpencil_draw_pass_range
if ((!stl->storage->is_mat_preview) && (multi)) {
MULTISAMPLE_GP_SYNC_DISABLE(stl->storage->multisamples, fbl, fb, txl);
}
+ }
+
+ /* draw strokes to use for selection */
+ static void drw_gpencil_select_render(GPENCIL_StorageList *stl, GPENCIL_PassList *psl)
++{
++ tGPencilObjectCache *cache_ob;
++ tGPencilObjectCache_shgrp *array_elm = NULL;
++ DRWShadingGroup *init_shgrp = NULL;
++ DRWShadingGroup *end_shgrp = NULL;
++
++ /* Draw all pending objects */
++ if ((stl->g_data->gp_cache_used > 0) &&
++ (stl->g_data->gp_object_cache))
++ {
++ /* sort by zdepth */
++ qsort(stl->g_data->gp_object_cache, stl->g_data->gp_cache_used,
++ sizeof(tGPencilObjectCache), gpencil_object_cache_compare_zdepth);
+
++ for (int i = 0; i < stl->g_data->gp_cache_used; i++) {
++ cache_ob = &stl->g_data->gp_object_cache[i];
++ if (cache_ob) {
++ bGPdata *gpd = cache_ob->gpd;
++ init_shgrp = NULL;
++ if (cache_ob->tot_layers > 0) {
++ for (int e = 0; e < cache_ob->tot_layers; e++) {
++ array_elm = &cache_ob->shgrp_array[e];
++ if (init_shgrp == NULL) {
++ init_shgrp = array_elm->init_shgrp;
++ }
++ end_shgrp = array_elm->end_shgrp;
++ }
++ /* draw group */
++ DRW_draw_pass_subset(
++ GPENCIL_3D_DRAWMODE(gpd) ? psl->stroke_pass_3d : psl->stroke_pass_2d,
++ init_shgrp, end_shgrp);
++ }
++ /* the cache must be dirty for next loop */
++ gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
++ }
++ }
++ }
+}
+
+/* draw strokes to use for selection */
+static void drw_gpencil_select_render(GPENCIL_StorageList *stl, GPENCIL_PassList *psl)
{
tGPencilObjectCache *cache_ob;
tGPencilObjectCache_shgrp *array_elm = NULL;
More information about the Bf-blender-cvs
mailing list