[Bf-blender-cvs] [e4a3c50d121] greasepencil-object: Cleanup: Use mathlib funcs instead of inlined math
Joshua Leung
noreply at git.blender.org
Wed Dec 13 10:28:54 CET 2017
Commit: e4a3c50d1212ce448f2bfe288622627593a4909a
Author: Joshua Leung
Date: Wed Dec 13 22:28:21 2017 +1300
Branches: greasepencil-object
https://developer.blender.org/rBe4a3c50d1212ce448f2bfe288622627593a4909a
Cleanup: Use mathlib funcs instead of inlined math
===================================================================
M source/blender/blenkernel/intern/gpencil.c
===================================================================
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 0c8fb905f10..bbc0e1ed325 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -2536,10 +2536,10 @@ bool BKE_gp_smooth_stroke_thickness(bGPDstroke *gps, int i, float inf)
* at the distance of point b
*/
float fac = line_point_factor_v3(&ptb->x, &pta->x, &ptc->x);
- float optimal = (1.0f - fac) * pta->pressure + fac * ptc->pressure;
+ float optimal = interpf(ptc->pressure, pta->pressure, fac);
/* Based on influence factor, blend between original and optimal */
- ptb->pressure = (1.0f - inf) * ptb->pressure + inf * optimal;
+ ptb->pressure = interpf(optimal, ptb->pressure, inf);
return true;
}
More information about the Bf-blender-cvs
mailing list