[Bf-blender-cvs] [ff5eba33aef] greasepencil-object: Minor tweaks to input samples function
Antonio Vazquez
noreply at git.blender.org
Wed Mar 7 18:11:01 CET 2018
Commit: ff5eba33aeff99a5640d7cb9db4d074226f6af85
Author: Antonio Vazquez
Date: Wed Mar 7 18:10:44 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rBff5eba33aeff99a5640d7cb9db4d074226f6af85
Minor tweaks to input samples function
Now, the thickness is reduced at different levels depending of samples. The values have been obtained by experimentation.
===================================================================
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 d005e50da86..eecc381b538 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -2758,7 +2758,20 @@ static void gpencil_add_missing_events(bContext *C, wmOperator *op, const wmEven
}
/* The thickness of the brush is reduced of thickness to get overlap dots */
- float factor = ((thickness * 0.40f) / scale) * samples;
+ float dot_factor = 0.50f;
+ if (samples < 2) {
+ dot_factor = 0.05f;
+ }
+ else if (samples < 4) {
+ dot_factor = 0.10f;
+ }
+ else if (samples < 7) {
+ dot_factor = 0.3f;
+ }
+ else if (samples < 10) {
+ dot_factor = 0.4f;
+ }
+ float factor = ((thickness * dot_factor) / scale) * samples;
copy_v2fl_v2i(a, p->mvalo);
b[0] = event->mval[0] + 1;
More information about the Bf-blender-cvs
mailing list