[Bf-blender-cvs] [6074eafe617] greasepencil-object: GPencil: Make UV random equals to UV Noise

Antonio Vazquez noreply at git.blender.org
Wed Mar 25 12:27:13 CET 2020


Commit: 6074eafe617c13f785330c939c3245ccaac21980
Author: Antonio Vazquez
Date:   Wed Mar 25 12:19:34 2020 +0100
Branches: greasepencil-object
https://developer.blender.org/rB6074eafe617c13f785330c939c3245ccaac21980

GPencil: Make UV random equals to UV Noise

===================================================================

M	source/blender/editors/gpencil/gpencil_paint.c

===================================================================

diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 36812d96b57..0744bdc31e5 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -789,7 +789,7 @@ static short gp_stroke_addpoint(tGPsdata *p, const float mval[2], float pressure
       /* apply randomness to uv texture rotation */
       if (brush_settings->uv_random > 0.0f) {
         float rand = BLI_rng_get_float(p->rng) * 2.0f - 1.0f;
-        pt->uv_rot += rand * M_PI * brush_settings->uv_random;
+        pt->uv_rot += rand * M_PI_2 * brush_settings->uv_random;
         CLAMP(pt->uv_rot, -M_PI_2, M_PI_2);
       }
       /* apply randomness to color strength */



More information about the Bf-blender-cvs mailing list