[Bf-blender-cvs] [8f117b39fc7] greasepencil-object: Merge branch 'master' into greasepencil-object
Antonio Vazquez
noreply at git.blender.org
Fri May 1 19:19:16 CEST 2020
Commit: 8f117b39fc7d82375b5c9802beec9034b512393d
Author: Antonio Vazquez
Date: Fri May 1 19:18:50 2020 +0200
Branches: greasepencil-object
https://developer.blender.org/rB8f117b39fc7d82375b5c9802beec9034b512393d
Merge branch 'master' into greasepencil-object
Conflicts:
source/blender/editors/gpencil/gpencil_paint.c
===================================================================
===================================================================
diff --cc source/blender/editors/gpencil/gpencil_paint.c
index e2471636712,0f7091b8b46..030d98d90e2
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@@ -3333,17 -3249,27 +3333,12 @@@ static void gpencil_add_arc_points(tGPs
/* Set pressure and strength equals to previous. It will be smoothed later. */
pt->pressure = pt_prev->pressure;
pt->strength = pt_prev->strength;
+ /* Interpolate vertex color. */
+ interp_v4_v4v4(
+ pt->vert_color, pt_before->vert_color, pt_prev->vert_color, stepcolor * (i + 1));
- /* Apply angle of stroke to brush size. */
- if (brush_settings->draw_angle_factor != 0.0f) {
- gp_brush_angle_segment(p, pt_prev, pt);
- /* Apply randomness to pressure. */
- if (brush_settings->draw_random_press > 0.0f) {
- float rand = BLI_rng_get_float(p->rng) * 2.0f - 1.0f;
- pt->pressure *= 1.0 + rand * 2.0 * brush_settings->draw_random_press;
- CLAMP(pt->pressure, GPENCIL_STRENGTH_MIN, 1.0f);
-- }
-
- /* Apply randomness to color strength. */
- if (brush_settings->draw_random_strength) {
- float rand = BLI_rng_get_float(p->rng) * 2.0f - 1.0f;
- pt->strength *= 1.0 + rand * brush_settings->draw_random_strength;
- CLAMP(pt->strength, GPENCIL_STRENGTH_MIN, 1.0f);
- }
- /* Apply randomness to uv texture rotation. */
- if (brush_settings->uv_random > 0.0f) {
- float rand = BLI_hash_int_01(BLI_hash_int_2d((int)pt->x, gpd->runtime.sbuffer_used + i)) *
- 2.0f -
- 1.0f;
- pt->uv_rot += rand * M_PI_2 * brush_settings->uv_random;
- CLAMP(pt->uv_rot, -M_PI_2, M_PI_2);
- }
+ /* Apply other randomness. */
+ gp_apply_randomness(p, brush_settings, pt, false, false, true);
a += step;
}
More information about the Bf-blender-cvs
mailing list