[Bf-blender-cvs] [164a49f0470] master: GPencil: Cleanup function names replace gp_ by gpencil_ prefix (cont)
Antonio Vazquez
noreply at git.blender.org
Mon Jun 29 15:52:12 CEST 2020
Commit: 164a49f04706a74477fb7be987fe7c5e578807a2
Author: Antonio Vazquez
Date: Mon Jun 29 15:46:59 2020 +0200
Branches: master
https://developer.blender.org/rB164a49f04706a74477fb7be987fe7c5e578807a2
GPencil: Cleanup function names replace gp_ by gpencil_ prefix (cont)
===================================================================
M source/blender/editors/gpencil/gpencil_fill.c
M source/blender/editors/gpencil/gpencil_paint.c
M source/blender/editors/gpencil/gpencil_primitive.c
M source/blender/editors/gpencil/gpencil_sculpt_paint.c
M source/blender/editors/gpencil/gpencil_select.c
M source/blender/editors/gpencil/gpencil_utils.c
M source/blender/editors/gpencil/gpencil_vertex_ops.c
M source/blender/editors/gpencil/gpencil_vertex_paint.c
M source/blender/editors/gpencil/gpencil_weight_paint.c
M source/blender/editors/include/ED_gpencil.h
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index 9a0c5ad997f..168693ff517 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -1129,7 +1129,7 @@ static void gpencil_stroke_from_buffer(tGPDfill *tgpf)
((ts->gpencil_v3d_align & GP_PROJECT_DEPTH_VIEW) == 0)) {
float origin[3];
ED_gpencil_drawing_reference_get(tgpf->scene, tgpf->ob, ts->gpencil_v3d_align, origin);
- ED_gp_project_stroke_to_plane(
+ ED_gpencil_project_stroke_to_plane(
tgpf->scene, tgpf->ob, tgpf->rv3d, gps, origin, tgpf->lock_axis - 1);
}
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 9af8d463304..882ab1f983a 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -431,7 +431,7 @@ static void gpencil_reproject_toplane(tGPsdata *p, bGPDstroke *gps)
/* get drawing origin */
gpencil_get_3d_reference(p, origin);
- ED_gp_project_stroke_to_plane(p->scene, obact, rv3d, gps, origin, p->lock_axis - 1);
+ ED_gpencil_project_stroke_to_plane(p->scene, obact, rv3d, gps, origin, p->lock_axis - 1);
}
/* convert screen-coordinates to buffer-coordinates */
@@ -891,11 +891,11 @@ static short gpencil_stroke_addpoint(tGPsdata *p,
gpencil_get_3d_reference(p, origin);
/* reproject current */
ED_gpencil_tpoint_to_point(p->region, origin, pt, &spt);
- ED_gp_project_point_to_plane(p->scene, obact, rv3d, origin, p->lock_axis - 1, &spt);
+ ED_gpencil_project_point_to_plane(p->scene, obact, rv3d, origin, p->lock_axis - 1, &spt);
/* reproject previous */
ED_gpencil_tpoint_to_point(p->region, origin, ptb, &spt2);
- ED_gp_project_point_to_plane(p->scene, obact, rv3d, origin, p->lock_axis - 1, &spt2);
+ ED_gpencil_project_point_to_plane(p->scene, obact, rv3d, origin, p->lock_axis - 1, &spt2);
p->totpixlen += len_v3v3(&spt.x, &spt2.x);
pt->uv_fac = p->totpixlen;
}
diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c
index 163ae817d73..6bb9f9628fa 100644
--- a/source/blender/editors/gpencil/gpencil_primitive.c
+++ b/source/blender/editors/gpencil/gpencil_primitive.c
@@ -982,12 +982,12 @@ static void gpencil_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi)
ED_gpencil_drawing_reference_get(tgpi->scene, tgpi->ob, ts->gpencil_v3d_align, origin);
/* reproject current */
ED_gpencil_tpoint_to_point(tgpi->region, origin, tpt, &spt);
- ED_gp_project_point_to_plane(
+ ED_gpencil_project_point_to_plane(
tgpi->scene, tgpi->ob, tgpi->rv3d, origin, tgpi->lock_axis - 1, &spt);
/* reproject previous */
ED_gpencil_tpoint_to_point(tgpi->region, origin, tptb, &spt2);
- ED_gp_project_point_to_plane(
+ ED_gpencil_project_point_to_plane(
tgpi->scene, tgpi->ob, tgpi->rv3d, origin, tgpi->lock_axis - 1, &spt2);
tgpi->totpixlen += len_v3v3(&spt.x, &spt2.x);
tpt->uv_fac = tgpi->totpixlen;
@@ -1045,7 +1045,7 @@ static void gpencil_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi)
if (!is_depth) {
float origin[3];
ED_gpencil_drawing_reference_get(tgpi->scene, tgpi->ob, ts->gpencil_v3d_align, origin);
- ED_gp_project_stroke_to_plane(
+ ED_gpencil_project_stroke_to_plane(
tgpi->scene, tgpi->ob, tgpi->rv3d, gps, origin, ts->gp_sculpt.lock_axis - 1);
}
diff --git a/source/blender/editors/gpencil/gpencil_sculpt_paint.c b/source/blender/editors/gpencil/gpencil_sculpt_paint.c
index 19d7ae7e483..d0adcea25c1 100644
--- a/source/blender/editors/gpencil/gpencil_sculpt_paint.c
+++ b/source/blender/editors/gpencil/gpencil_sculpt_paint.c
@@ -172,9 +172,9 @@ typedef bool (*GP_BrushApplyCb)(tGP_BrushEditData *gso,
/* Utility Functions */
/* apply lock axis reset */
-static void gpsculpt_compute_lock_axis(tGP_BrushEditData *gso,
- bGPDspoint *pt,
- const float save_pt[3])
+static void gpencil_sculpt_compute_lock_axis(tGP_BrushEditData *gso,
+ bGPDspoint *pt,
+ const float save_pt[3])
{
const ToolSettings *ts = gso->scene->toolsettings;
const View3DCursor *cursor = &gso->scene->cursor;
@@ -221,7 +221,7 @@ static void gpsculpt_compute_lock_axis(tGP_BrushEditData *gso,
/* Context ---------------------------------------- */
/* Get the sculpting settings */
-static GP_Sculpt_Settings *gpsculpt_get_settings(Scene *scene)
+static GP_Sculpt_Settings *gpencil_sculpt_get_settings(Scene *scene)
{
return &scene->toolsettings->gp_sculpt;
}
@@ -229,7 +229,7 @@ static GP_Sculpt_Settings *gpsculpt_get_settings(Scene *scene)
/* Brush Operations ------------------------------- */
/* Invert behavior of brush? */
-static bool gp_brush_invert_check(tGP_BrushEditData *gso)
+static bool gpencil_brush_invert_check(tGP_BrushEditData *gso)
{
/* The basic setting is the brush's setting (from the panel) */
bool invert = ((gso->brush->gpencil_settings->sculpt_flag & GP_SCULPT_FLAG_INVERT) != 0) ||
@@ -251,7 +251,9 @@ static bool gp_brush_invert_check(tGP_BrushEditData *gso)
}
/* Compute strength of effect */
-static float gp_brush_influence_calc(tGP_BrushEditData *gso, const int radius, const int co[2])
+static float gpencil_brush_influence_calc(tGP_BrushEditData *gso,
+ const int radius,
+ const int co[2])
{
Brush *brush = gso->brush;
@@ -322,14 +324,14 @@ static void gpencil_update_geometry(bGPdata *gpd)
/* A simple (but slower + inaccurate)
* smooth-brush implementation to test the algorithm for stroke smoothing. */
-static bool gp_brush_smooth_apply(tGP_BrushEditData *gso,
- bGPDstroke *gps,
- float UNUSED(rot_eval),
- int pt_index,
- const int radius,
- const int co[2])
+static bool gpencil_brush_smooth_apply(tGP_BrushEditData *gso,
+ bGPDstroke *gps,
+ float UNUSED(rot_eval),
+ int pt_index,
+ const int radius,
+ const int co[2])
{
- float inf = gp_brush_influence_calc(gso, radius, co);
+ float inf = gpencil_brush_influence_calc(gso, radius, co);
/* perform smoothing */
if (gso->brush->gpencil_settings->sculpt_mode_flag & GP_SCULPT_FLAGMODE_APPLY_POSITION) {
@@ -352,12 +354,12 @@ static bool gp_brush_smooth_apply(tGP_BrushEditData *gso,
/* Line Thickness Brush */
/* Make lines thicker or thinner by the specified amounts */
-static bool gp_brush_thickness_apply(tGP_BrushEditData *gso,
- bGPDstroke *gps,
- float UNUSED(rot_eval),
- int pt_index,
- const int radius,
- const int co[2])
+static bool gpencil_brush_thickness_apply(tGP_BrushEditData *gso,
+ bGPDstroke *gps,
+ float UNUSED(rot_eval),
+ int pt_index,
+ const int radius,
+ const int co[2])
{
bGPDspoint *pt = gps->points + pt_index;
float inf;
@@ -366,12 +368,12 @@ static bool gp_brush_thickness_apply(tGP_BrushEditData *gso,
* - We divide the strength by 10, so that users can set "sane" values.
* Otherwise, good default values are in the range of 0.093
*/
- inf = gp_brush_influence_calc(gso, radius, co) / 10.0f;
+ inf = gpencil_brush_influence_calc(gso, radius, co) / 10.0f;
/* apply */
/* XXX: this is much too strong,
* and it should probably do some smoothing with the surrounding stuff. */
- if (gp_brush_invert_check(gso)) {
+ if (gpencil_brush_invert_check(gso)) {
/* make line thinner - reduce stroke pressure */
pt->pressure -= inf;
}
@@ -396,21 +398,21 @@ static bool gp_brush_thickness_apply(tGP_BrushEditData *gso,
/* Color Strength Brush */
/* Make color more or less transparent by the specified amounts */
-static bool gp_brush_strength_apply(tGP_BrushEditData *gso,
- bGPDstroke *gps,
- float UNUSED(rot_eval),
- int pt_index,
- const int radius,
- const int co[2])
+static bool gpencil_brush_strength_apply(tGP_BrushEditData *gso,
+ bGPDstroke *gps,
+ float UNUSED(rot_eval),
+ int pt_index,
+ const int radius,
+ const int co[2])
{
bGPDspoint *pt = gps->points + pt_index;
float inf;
/* Compute strength of effect */
- inf = gp_brush_influence_calc(gso, radius, co) * 0.125f;
+ inf = gpencil_brush_influence_calc(gso, radius, co) * 0.125f;
/* Invert effect. */
- if (gp_brush_invert_check(gso)) {
+ if (gpencil_brush_invert_check(gso)) {
inf *= -1.0f;
}
@@ -443,7 +445,7 @@ typedef struct tGPSB_Grab_StrokeData {
} tGPSB_Grab_StrokeData;
/* initialise custom data for handling this stroke */
-static void gp_brush_grab_stroke_init(tGP_BrushEditData *gso, bGPDstroke *gps)
+static void gpencil_brush_grab_stroke_init(tGP_BrushEditData *gso, bGPDstroke *gps)
{
tGPSB_Grab_StrokeData *data = NULL;
@@ -481,15 +483,15 @@ static void gp_brush_grab_stroke_init(tGP_BrushEditData *gso, bGPDstroke *gps)
}
/* store references to stroke points in the initial stage */
-static bool gp
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list