[Bf-blender-cvs] [6ddb176e7a2] greasepencil-object: Cleanup: More function rename
Antonio Vazquez
noreply at git.blender.org
Fri May 11 16:25:16 CEST 2018
Commit: 6ddb176e7a2f3c59292be6cfa588294aad6889d8
Author: Antonio Vazquez
Date: Fri May 11 16:25:09 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB6ddb176e7a2f3c59292be6cfa588294aad6889d8
Cleanup: More function rename
===================================================================
M source/blender/blenkernel/BKE_gpencil.h
M source/blender/blenkernel/intern/gpencil.c
M source/blender/editors/gpencil/gpencil_brush.c
M source/blender/editors/gpencil/gpencil_paint.c
M source/blender/editors/transform/transform_conversions.c
M source/blender/modifiers/intern/MOD_gpencilsmooth.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_gpencil.h b/source/blender/blenkernel/BKE_gpencil.h
index 1c718da886e..cec03046c02 100644
--- a/source/blender/blenkernel/BKE_gpencil.h
+++ b/source/blender/blenkernel/BKE_gpencil.h
@@ -181,11 +181,11 @@ void BKE_gpencil_simplify_fixed(struct bGPDlayer *gpl, struct bGPDstroke *gps);
void BKE_gpencil_transform(struct bGPdata *gpd, float mat[4][4]);
bool BKE_gpencil_smooth_stroke(struct bGPDstroke *gps, int i, float inf);
-bool BKE_gp_smooth_stroke_strength(struct bGPDstroke *gps, int i, float inf);
-bool BKE_gp_smooth_stroke_thickness(struct bGPDstroke *gps, int i, float inf);
-bool BKE_gp_smooth_stroke_uv(struct bGPDstroke *gps, int i, float inf);
+bool BKE_gpencil_smooth_stroke_strength(struct bGPDstroke *gps, int i, float inf);
+bool BKE_gpencil_smooth_stroke_thickness(struct bGPDstroke *gps, int i, float inf);
+bool BKE_gpencil_smooth_stroke_uv(struct bGPDstroke *gps, int i, float inf);
-void BKE_gp_get_range_selected(struct bGPDlayer *gpl, int *r_initframe, int *r_endframe);
+void BKE_gpencil_get_range_selected(struct bGPDlayer *gpl, int *r_initframe, int *r_endframe);
float BKE_gpencil_multiframe_falloff_calc(struct bGPDframe *gpf, int actnum, int f_init, int f_end, struct CurveMapping *cur_falloff);
#endif /* __BKE_GPENCIL_H__ */
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index ec888e22ea0..d272c9f5b99 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -1462,7 +1462,7 @@ bool BKE_gpencil_smooth_stroke(bGPDstroke *gps, int i, float inf)
* \param i Point index
* \param inf Amount of smoothing to apply
*/
-bool BKE_gp_smooth_stroke_strength(bGPDstroke *gps, int i, float inf)
+bool BKE_gpencil_smooth_stroke_strength(bGPDstroke *gps, int i, float inf)
{
bGPDspoint *ptb = &gps->points[i];
@@ -1500,7 +1500,7 @@ bool BKE_gp_smooth_stroke_strength(bGPDstroke *gps, int i, float inf)
* \param i Point index
* \param inf Amount of smoothing to apply
*/
-bool BKE_gp_smooth_stroke_thickness(bGPDstroke *gps, int i, float inf)
+bool BKE_gpencil_smooth_stroke_thickness(bGPDstroke *gps, int i, float inf)
{
bGPDspoint *ptb = &gps->points[i];
@@ -1538,7 +1538,7 @@ bool BKE_gp_smooth_stroke_thickness(bGPDstroke *gps, int i, float inf)
* \param i Point index
* \param inf Amount of smoothing to apply
*/
-bool BKE_gp_smooth_stroke_uv(bGPDstroke *gps, int i, float inf)
+bool BKE_gpencil_smooth_stroke_uv(bGPDstroke *gps, int i, float inf)
{
bGPDspoint *ptb = &gps->points[i];
@@ -1579,7 +1579,7 @@ bool BKE_gp_smooth_stroke_uv(bGPDstroke *gps, int i, float inf)
* \param r_initframe Number of first selected frame
* \param r_endframe Number of last selected frame
*/
-void BKE_gp_get_range_selected(bGPDlayer *gpl, int *r_initframe, int *r_endframe)
+void BKE_gpencil_get_range_selected(bGPDlayer *gpl, int *r_initframe, int *r_endframe)
{
*r_initframe = gpl->actframe->framenum;
*r_endframe = gpl->actframe->framenum;
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c
index e6c32862feb..bba0d825c13 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -296,13 +296,13 @@ static bool gp_brush_smooth_apply(
BKE_gpencil_smooth_stroke(gps, pt_index, inf);
}
if (gso->settings->flag & GP_BRUSHEDIT_FLAG_APPLY_STRENGTH) {
- BKE_gp_smooth_stroke_strength(gps, pt_index, inf);
+ BKE_gpencil_smooth_stroke_strength(gps, pt_index, inf);
}
if (gso->settings->flag & GP_BRUSHEDIT_FLAG_APPLY_THICKNESS) {
- BKE_gp_smooth_stroke_thickness(gps, pt_index, inf);
+ BKE_gpencil_smooth_stroke_thickness(gps, pt_index, inf);
}
if (gso->settings->flag & GP_BRUSHEDIT_FLAG_APPLY_UV) {
- BKE_gp_smooth_stroke_uv(gps, pt_index, inf);
+ BKE_gpencil_smooth_stroke_uv(gps, pt_index, inf);
}
return true;
@@ -375,7 +375,7 @@ static bool gp_brush_strength_apply(
pt->strength += inf;
}
/* smooth the strength */
- BKE_gp_smooth_stroke_strength(gps, pt_index, inf);
+ BKE_gpencil_smooth_stroke_strength(gps, pt_index, inf);
/* Strength should stay within [0.0, 1.0] */
CLAMP(pt->strength, 0.0f, 1.0f);
@@ -1619,7 +1619,7 @@ static bool gpsculpt_brush_apply_standard(bContext *C, tGP_BrushEditData *gso)
int f_end = 0;
if (gso->use_multiframe_falloff) {
- BKE_gp_get_range_selected(gpl, &f_init, &f_end);
+ BKE_gpencil_get_range_selected(gpl, &f_init, &f_end);
}
for (bGPDframe *gpf = gpl->frames.first; gpf; gpf = gpf->next) {
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 06665a7ba2b..7764dfcca58 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1123,7 +1123,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
for (int r = 0; r < brush->draw_smoothlvl; r++) {
for (i = 0; i < gps->totpoints; i++) {
BKE_gpencil_smooth_stroke(gps, i, brush->draw_smoothfac - reduce);
- BKE_gp_smooth_stroke_strength(gps, i, brush->draw_smoothfac);
+ BKE_gpencil_smooth_stroke_strength(gps, i, brush->draw_smoothfac);
}
reduce += 0.25f; // reduce the factor
}
@@ -1132,7 +1132,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
if ((brush->gp_flag & GP_BRUSH_GROUP_SETTINGS) && (brush->gp_thick_smoothfac > 0.0f)) {
for (int r = 0; r < brush->gp_thick_smoothlvl * 2; r++) {
for (i = 0; i < gps->totpoints; i++) {
- BKE_gp_smooth_stroke_thickness(gps, i, brush->gp_thick_smoothfac);
+ BKE_gpencil_smooth_stroke_thickness(gps, i, brush->gp_thick_smoothfac);
}
}
}
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 82f0cbfabbd..6669bc1effb 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -8160,7 +8160,7 @@ static void createTransGPencil(bContext *C, TransInfo *t)
int f_end = 0;
if (use_multiframe_falloff) {
- BKE_gp_get_range_selected(gpl, &f_init, &f_end);
+ BKE_gpencil_get_range_selected(gpl, &f_init, &f_end);
}
/* calculate difference matrix */
diff --git a/source/blender/modifiers/intern/MOD_gpencilsmooth.c b/source/blender/modifiers/intern/MOD_gpencilsmooth.c
index 3ff8540f829..25b85d6a2bf 100644
--- a/source/blender/modifiers/intern/MOD_gpencilsmooth.c
+++ b/source/blender/modifiers/intern/MOD_gpencilsmooth.c
@@ -93,16 +93,16 @@ static void deformStroke(ModifierData *md, Depsgraph *UNUSED(depsgraph),
BKE_gpencil_smooth_stroke(gps, i, val);
}
if (mmd->flag & GP_SMOOTH_MOD_STRENGTH) {
- BKE_gp_smooth_stroke_strength(gps, i, val);
+ BKE_gpencil_smooth_stroke_strength(gps, i, val);
}
if ((mmd->flag & GP_SMOOTH_MOD_THICKNESS) && (val > 0)) {
/* thickness need to repeat process several times */
for (int r2 = 0; r2 < r * 10; r2++) {
- BKE_gp_smooth_stroke_thickness(gps, i, val);
+ BKE_gpencil_smooth_stroke_thickness(gps, i, val);
}
}
if (mmd->flag & GP_SMOOTH_MOD_UV) {
- BKE_gp_smooth_stroke_uv(gps, i, val);
+ BKE_gpencil_smooth_stroke_uv(gps, i, val);
}
}
}
More information about the Bf-blender-cvs
mailing list