Commit: 030c1d4aeaa892bd1fb58f269a9a50e049ea2f3b
Author: Antonio Vazquez
Date:   Tue Jun 13 13:24:06 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB030c1d4aeaa892bd1fb58f269a9a50e049ea2f3b

Cleanup compiler warnings

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

M       source/blender/draw/engines/gpencil/gpencil_engine.h
M       source/blender/draw/engines/gpencil/gpencil_geom.c
M       source/blender/editors/gpencil/gpencil_edit.c
M       source/blender/editors/include/ED_gpencil.h

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

diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.h 
b/source/blender/draw/engines/gpencil/gpencil_engine.h
index c150a48f778..7cde5d7dfd0 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.h
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.h
@@ -132,6 +132,8 @@ typedef struct GpencilBatchCache {
        int cache_idx;   /* current slot index */
 } GpencilBatchCache;
 
+struct tGPspoint;
+
 struct DRWShadingGroup *DRW_gpencil_shgroup_stroke_create(struct GPENCIL_Data 
*vedata, struct DRWPass *pass, struct GPUShader *shader, bGPdata *gpd);
 struct DRWShadingGroup *DRW_gpencil_shgroup_point_volumetric_create(struct 
DRWPass *pass, struct GPUShader *shader);
 struct DRWShadingGroup *DRW_gpencil_shgroup_edit_volumetric_create(struct 
DRWPass *pass, struct GPUShader *shader);
diff --git a/source/blender/draw/engines/gpencil/gpencil_geom.c 
b/source/blender/draw/engines/gpencil/gpencil_geom.c
index 60a65d0b4f7..03451349c6d 100644
--- a/source/blender/draw/engines/gpencil/gpencil_geom.c
+++ b/source/blender/draw/engines/gpencil/gpencil_geom.c
@@ -59,7 +59,8 @@ static void gpencil_set_stroke_point(VertexBuffer *vbo, float 
matrix[4][4], cons
        
        float alpha = ink[3] * pt->strength;
        CLAMP(alpha, GPENCIL_STRENGTH_MIN, 1.0f);
-       float col[4] = { ink[0], ink[1], ink[2], alpha };
+       float col[4];
+       ARRAY_SET_ITEMS(col, ink[0], ink[1], ink[2], alpha);
        VertexBuffer_set_attrib(vbo, color_id, idx, col);
 
        /* the thickness of the stroke must be affected by zoom, so a pixel 
scale is calculated */
@@ -86,7 +87,8 @@ Batch *DRW_gpencil_get_point_geom(bGPDspoint *pt, short 
thickness, const float i
 
        float alpha = ink[3] * pt->strength;
        CLAMP(alpha, GPENCIL_STRENGTH_MIN, 1.0f);
-       float col[4] = { ink[0], ink[1], ink[2], alpha };
+       float col[4];
+       ARRAY_SET_ITEMS(col, ink[0], ink[1], ink[2], alpha);
        VertexBuffer_set_attrib(vbo, color_id, 0, col);
 
        float thick = max_ff(pt->pressure * thickness, 1.0f);
@@ -151,7 +153,8 @@ Batch *DRW_gpencil_get_stroke_geom(bGPDframe *gpf, 
bGPDstroke *gps, short thickn
 /* helper to convert 2d to 3d for simple drawing buffer */
 static void gpencil_stroke_convertcoords(Scene *scene, ARegion *ar, View3D 
*v3d, const tGPspoint *point2D, float out[3])
 {
-       float mval_f[2] = { point2D->x, point2D->y };
+       float mval_f[2];
+       ARRAY_SET_ITEMS(mval_f, point2D->x, point2D->y);
        float mval_prj[2];
        float rvec[3], dvec[3];
        float zfac;
@@ -215,7 +218,8 @@ Batch *DRW_gpencil_get_buffer_point_geom(bGPdata *gpd, 
short thickness)
 
        float alpha = ink[3] * pt.strength;
        CLAMP(alpha, GPENCIL_STRENGTH_MIN, 1.0f);
-       float col[4] = { ink[0], ink[1], ink[2], alpha };
+       float col[4];
+       ARRAY_SET_ITEMS(col, ink[0], ink[1], ink[2], alpha);
        VertexBuffer_set_attrib(vbo, color_id, 0, col);
 
        float thick = max_ff(pt.pressure * thickness, 1.0f);
diff --git a/source/blender/editors/gpencil/gpencil_edit.c 
b/source/blender/editors/gpencil/gpencil_edit.c
index abc40a2d746..14d947b059f 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -711,6 +711,8 @@ static int gp_strokes_copy_exec(bContext *C, wmOperator *op)
        if (gp_strokes_copypastebuf.first) {
                gp_strokes_copypastebuf_colors = BLI_ghash_str_new("GPencil 
CopyBuf Colors");
                
+               /* TODO: this code must be review because this is not relevant 
now and use Blender Palettes */
+#if 0
                for (bGPDstroke *gps = gp_strokes_copypastebuf.first; gps; gps 
= gps->next) {
                        if (ED_gpencil_stroke_can_use(C, gps)) {
                                if 
(BLI_ghash_haskey(gp_strokes_copypastebuf_colors, gps->colorname) == false) {
@@ -721,6 +723,7 @@ static int gp_strokes_copy_exec(bContext *C, wmOperator *op)
                                }
                        }
                }
+#endif
        }
        
        /* updates (to ensure operator buttons are refreshed, when used via 
hotkeys) */
diff --git a/source/blender/editors/include/ED_gpencil.h 
b/source/blender/editors/include/ED_gpencil.h
index 9d910c4539d..0008f4fc2f4 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -39,6 +39,7 @@ struct bGPdata;
 struct bGPDlayer;
 struct bGPDframe;
 struct bGPDstroke;
+struct bGPDspoint;
 struct bGPDpalette;
 struct bGPDpalettecolor;
 struct bGPDspoint;
@@ -56,7 +57,6 @@ struct View3D;
 struct wmKeyConfig;
 struct wmWindowManager;
 
-
 /* ------------- Grease-Pencil Helpers ---------------- */
 typedef struct tGPDinterpolate_layer {
        struct tGPDinterpolate_layer *next, *prev;

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to