Commit: 58996e3057f9a2a6ce4a87a0b36b8fcfafcb8967 Author: Antonioya Date: Thu Jun 27 16:42:18 2019 +0200 Branches: master https://developer.blender.org/rB58996e3057f9a2a6ce4a87a0b36b8fcfafcb8967
Cleanup: GPencil remove DRW_ prefix for internal functions. The prefix DRW_ must be used only for modules inside Draw Manager and not in the Engines. =================================================================== M source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c M source/blender/draw/engines/gpencil/gpencil_draw_utils.c M source/blender/draw/engines/gpencil/gpencil_engine.c M source/blender/draw/engines/gpencil/gpencil_engine.h M source/blender/draw/engines/gpencil/gpencil_render.c M source/blender/draw/engines/gpencil/gpencil_shader_fx.c =================================================================== diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c index 7b2c0ed168e..18950f00823 100644 --- a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c +++ b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c @@ -130,11 +130,11 @@ static void gpencil_vbo_ensure_size(GpencilBatchCacheElem *be, int totvertex) } /* create batch geometry data for points stroke shader */ -void DRW_gpencil_get_point_geom(GpencilBatchCacheElem *be, - bGPDstroke *gps, - short thickness, - const float ink[4], - const int alignment_mode) +void gpencil_get_point_geom(GpencilBatchCacheElem *be, + bGPDstroke *gps, + short thickness, + const float ink[4], + const int alignment_mode) { int totvertex = gps->totpoints; if (be->vbo == NULL) { @@ -211,10 +211,10 @@ void DRW_gpencil_get_point_geom(GpencilBatchCacheElem *be, } /* create batch geometry data for stroke shader */ -void DRW_gpencil_get_stroke_geom(struct GpencilBatchCacheElem *be, - bGPDstroke *gps, - short thickness, - const float ink[4]) +void gpencil_get_stroke_geom(struct GpencilBatchCacheElem *be, + bGPDstroke *gps, + short thickness, + const float ink[4]) { bGPDspoint *points = gps->points; int totpoints = gps->totpoints; @@ -319,17 +319,17 @@ void DRW_gpencil_get_stroke_geom(struct GpencilBatchCacheElem *be, } /* create batch geometry data for stroke shader */ -void DRW_gpencil_get_fill_geom(struct GpencilBatchCacheElem *be, - Object *ob, - bGPDstroke *gps, - const float color[4]) +void gpencil_get_fill_geom(struct GpencilBatchCacheElem *be, + Object *ob, + bGPDstroke *gps, + const float color[4]) { BLI_assert(gps->totpoints >= 3); /* Calculate triangles cache for filling area (must be done only after changes) */ if ((gps->flag & GP_STROKE_RECALC_GEOMETRY) || (gps->tot_triangles == 0) || (gps->triangles == NULL)) { - DRW_gpencil_triangulate_stroke_fill(ob, gps); + gpencil_triangulate_stroke_fill(ob, gps); } BLI_assert(gps->tot_triangles >= 1); @@ -365,7 +365,7 @@ void DRW_gpencil_get_fill_geom(struct GpencilBatchCacheElem *be, } /* create batch geometry data for current buffer stroke shader */ -GPUBatch *DRW_gpencil_get_buffer_stroke_geom(bGPdata *gpd, short thickness) +GPUBatch *gpencil_get_buffer_stroke_geom(bGPdata *gpd, short thickness) { const DRWContextState *draw_ctx = DRW_context_state_get(); Scene *scene = draw_ctx->scene; @@ -467,7 +467,7 @@ GPUBatch *DRW_gpencil_get_buffer_stroke_geom(bGPdata *gpd, short thickness) } /* create batch geometry data for current buffer point shader */ -GPUBatch *DRW_gpencil_get_buffer_point_geom(bGPdata *gpd, short thickness) +GPUBatch *gpencil_get_buffer_point_geom(bGPdata *gpd, short thickness) { const DRWContextState *draw_ctx = DRW_context_state_get(); Scene *scene = draw_ctx->scene; @@ -550,7 +550,7 @@ GPUBatch *DRW_gpencil_get_buffer_point_geom(bGPdata *gpd, short thickness) } /* create batch geometry data for current buffer control point shader */ -GPUBatch *DRW_gpencil_get_buffer_ctrlpoint_geom(bGPdata *gpd) +GPUBatch *gpencil_get_buffer_ctrlpoint_geom(bGPdata *gpd) { bGPDcontrolpoint *cps = gpd->runtime.cp_points; int totpoints = gpd->runtime.tot_cp_points; @@ -614,7 +614,7 @@ GPUBatch *DRW_gpencil_get_buffer_ctrlpoint_geom(bGPdata *gpd) } /* create batch geometry data for current buffer fill shader */ -GPUBatch *DRW_gpencil_get_buffer_fill_geom(bGPdata *gpd) +GPUBatch *gpencil_get_buffer_fill_geom(bGPdata *gpd) { if (gpd == NULL) { return NULL; @@ -694,10 +694,10 @@ GPUBatch *DRW_gpencil_get_buffer_fill_geom(bGPdata *gpd) } /* Draw selected verts for strokes being edited */ -void DRW_gpencil_get_edit_geom(struct GpencilBatchCacheElem *be, - bGPDstroke *gps, - float alpha, - short dflag) +void gpencil_get_edit_geom(struct GpencilBatchCacheElem *be, + bGPDstroke *gps, + float alpha, + short dflag) { const DRWContextState *draw_ctx = DRW_context_state_get(); Object *ob = draw_ctx->obact; @@ -797,10 +797,10 @@ void DRW_gpencil_get_edit_geom(struct GpencilBatchCacheElem *be, } /* Draw lines for strokes being edited */ -void DRW_gpencil_get_edlin_geom(struct GpencilBatchCacheElem *be, - bGPDstroke *gps, - float alpha, - short UNUSED(dflag)) +void gpencil_get_edlin_geom(struct GpencilBatchCacheElem *be, + bGPDstroke *gps, + float alpha, + short UNUSED(dflag)) { const DRWContextState *draw_ctx = DRW_context_state_get(); Object *ob = draw_ctx->obact; @@ -896,7 +896,7 @@ static void set_grid_point(GPUVertBuf *vbo, } /* Draw grid lines */ -GPUBatch *DRW_gpencil_get_grid(Object *ob) +GPUBatch *gpencil_get_grid(Object *ob) { const DRWContextState *draw_ctx = DRW_context_state_get(); Scene *scene = draw_ctx->scene; diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c index b41085868d1..fa706812715 100644 --- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c @@ -86,7 +86,7 @@ static void gpencil_calc_vertex(GPENCIL_StorageList *stl, (bool)((draw_ctx->v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) : true; const bool do_onion = (bool)((gpd->flag & GP_DATA_STROKE_WEIGHTMODE) == 0) && overlay && - main_onion && DRW_gpencil_onion_active(gpd) && !playing; + main_onion && gpencil_onion_active(gpd) && !playing; const bool time_remap = BKE_gpencil_has_time_modifiers(ob); const bool is_multiedit = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd); @@ -232,10 +232,10 @@ static void gpencil_calc_stroke_fill_uv( } /* recalc the internal geometry caches for fill and uvs */ -static void DRW_gpencil_recalc_geometry_caches(Object *ob, - bGPDlayer *gpl, - MaterialGPencilStyle *gp_style, - bGPDstroke *gps) +static void gpencil_recalc_geometry_caches(Object *ob, + bGPDlayer *gpl, + MaterialGPencilStyle *gp_style, + bGPDstroke *gps) { if (gps->flag & GP_STROKE_RECALC_GEOMETRY) { /* Calculate triangles cache for filling area (must be done only after changes) */ @@ -243,7 +243,7 @@ static void DRW_gpencil_recalc_geometry_caches(Object *ob, if ((gps->totpoints > 2) && ((gp_style->fill_rgba[3] > GPENCIL_ALPHA_OPACITY_THRESH) || (gp_style->fill_style > 0) || (gpl->blend_mode != eGplBlendMode_Regular))) { - DRW_gpencil_triangulate_stroke_fill(ob, gps); + gpencil_triangulate_stroke_fill(ob, gps); } } @@ -355,15 +355,15 @@ static void set_wireframe_color(Object *ob, } /* create shading group for filling */ -static DRWShadingGroup *DRW_gpencil_shgroup_fill_create(GPENCIL_Data *vedata, - DRWPass *pass, - GPUShader *shader, - Object *ob, - bGPdata *gpd, - bGPDlayer *gpl, - MaterialGPencilStyle *gp_style, - int id, - int shading_type[2]) +static DRWShadingGroup *gpencil_shgroup_fill_create(GPENCIL_Data *vedata, + DRWPass *pass, + GPUShader *shader, + Object *ob, + bGPdata *gpd, + bGPDlayer *gpl, + MaterialGPencilStyle *gp_style, + int id, + int shading_type[2]) { GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl; const DRWContextState *draw_ctx = DRW_context_state_get(); @@ -484,7 +484,7 @@ static DRWShadingGroup *DRW_gpencil_shgroup_fill_create(GPENCIL_Data *vedata, } /* check if some onion is enabled */ -bool DRW_gpencil_onion_active(bGPdata *gpd) +bool gpencil_onion_active(bGPdata *gpd) { for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) { if (gpl->onion_flag & GP_LAYER_ONIONSKIN) { @@ -495,18 +495,18 @@ bool DRW_gpencil_onion_active(bGPdata *gpd) } /* create shading group for strokes */ -DRWShadingGroup *DRW_gpencil_shgroup_stroke_create(GPENCIL_Data *vedata, - DRWPass *pass, - GPUShader *shader, - Object *ob, - bGPdata *gpd, - bGPDlayer *gpl, - @@ Diff output truncated at 10240 characters. @@ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs