[Bf-blender-cvs] [63ea3ffa263] greasepencil-object: Merge branch 'master' into greasepencil-object

Antonioya noreply at git.blender.org
Thu Feb 28 16:17:19 CET 2019


Commit: 63ea3ffa263cdf0a5caea0f68fe9009f4506acb0
Author: Antonioya
Date:   Thu Feb 28 16:13:26 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rB63ea3ffa263cdf0a5caea0f68fe9009f4506acb0

Merge branch 'master' into greasepencil-object

 Conflicts:
	source/blender/draw/engines/gpencil/gpencil_engine.c
	source/blender/draw/engines/gpencil/gpencil_engine.h
	source/blender/draw/engines/gpencil/shaders/gpencil_zdepth_mix_frag.glsl

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



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

diff --cc source/blender/draw/engines/gpencil/gpencil_engine.c
index 2ce7a53e968,d9ee2b26b50..664f49b8fef
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@@ -766,45 -766,45 +766,86 @@@ static void gpencil_draw_pass_range
  
  /* 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;
+ 	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 scene */
  void GPENCIL_draw_scene(void *ved)
  {



More information about the Bf-blender-cvs mailing list