[Bf-blender-cvs] [27bd836326c] greasepencil-refactor: GPencil: Cleanup compiler warnings
Antonio Vazquez
noreply at git.blender.org
Wed Jan 8 17:41:13 CET 2020
Commit: 27bd836326cd1d46be302612fd15aff355b62d5d
Author: Antonio Vazquez
Date: Wed Jan 8 17:41:06 2020 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rB27bd836326cd1d46be302612fd15aff355b62d5d
GPencil: Cleanup compiler warnings
===================================================================
M source/blender/draw/engines/gpencil/gpencil_shader_fx.c
M source/blender/editors/sculpt_paint/paint_ops.c
===================================================================
diff --git a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
index 106f45436dd..d0ccc2611ba 100644
--- a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
+++ b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
@@ -59,62 +59,6 @@ static bool effect_is_active(bGPdata *gpd, ShaderFxData *fx, bool is_render)
return false;
}
-/**
- * Get normal of draw using one stroke of visible layer
- * \param gpd: GP datablock
- * \param r_point: Point on plane
- * \param r_normal: Normal vector
- */
-static bool get_normal_vector(bGPdata *gpd, float r_point[3], float r_normal[3])
-{
- for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
- if (gpl->flag & GP_LAYER_HIDE) {
- continue;
- }
-
- /* get frame */
- bGPDframe *gpf = gpl->actframe;
- if (gpf == NULL) {
- continue;
- }
- for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
- if (gps->totpoints >= 3) {
- bGPDspoint *pt = &gps->points[0];
- BKE_gpencil_stroke_normal(gps, r_normal);
- /* in some weird situations, the normal cannot be calculated, so try next stroke */
- if ((r_normal[0] != 0.0f) || (r_normal[1] != 0.0f) || (r_normal[2] != 0.0f)) {
- copy_v3_v3(r_point, &pt->x);
- return true;
- }
- }
- }
- }
-
- return false;
-}
-
-/* helper to get near and far depth of field values */
-static void GPENCIL_dof_nearfar(Object *camera, float coc, float nearfar[2])
-{
- if (camera == NULL) {
- return;
- }
- Camera *cam = camera->data;
-
- float fstop = cam->dof.aperture_fstop;
- float focus_dist = BKE_camera_object_dof_distance(camera);
- float focal_len = cam->lens;
-
- const float scale_camera = 0.001f;
- /* we want radius here for the aperture number */
- float aperture_scaled = 0.5f * scale_camera * focal_len / fstop;
- float focal_len_scaled = scale_camera * focal_len;
-
- float hyperfocal = (focal_len_scaled * focal_len_scaled) / (aperture_scaled * coc);
- nearfar[0] = (hyperfocal * focus_dist) / (hyperfocal + focal_len);
- nearfar[1] = (hyperfocal * focus_dist) / (hyperfocal - focal_len);
-}
-
typedef struct gpIterVfxData {
GPENCIL_PrivateData *pd;
GPENCIL_tObject *tgp_ob;
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index 22156c0a13c..438c400812f 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -358,7 +358,7 @@ static int palette_extract_img_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void PALETTE_OT_extract_from_image(wmOperatorType *ot)
+static void PALETTE_OT_extract_from_image(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Extract Palette from Image";
@@ -454,7 +454,7 @@ static int palette_sort_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void PALETTE_OT_sort(wmOperatorType *ot)
+static void PALETTE_OT_sort(wmOperatorType *ot)
{
static const EnumPropertyItem sort_type[] = {
{-1, "HSV", 0, "Hue, Saturation, Value", ""},
@@ -499,7 +499,7 @@ static int palette_color_move_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void PALETTE_OT_color_move(wmOperatorType *ot)
+static void PALETTE_OT_color_move(wmOperatorType *ot)
{
static const EnumPropertyItem slot_move[] = {
{-1, "UP", 0, "Up", ""},
@@ -582,7 +582,7 @@ static int palette_join_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void PALETTE_OT_join(wmOperatorType *ot)
+static void PALETTE_OT_join(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Join Palette Swatches";
More information about the Bf-blender-cvs
mailing list