[Bf-blender-cvs] [db688b62f9e] master: Fix T103764: Grease Pencil modes other than Draw use a wrong radial
Antonio Vazquez
noreply at git.blender.org
Tue Jan 10 17:01:02 CET 2023
Commit: db688b62f9e2d5a73d7bfaaac7cb0f5b2e8c1d6b
Author: Antonio Vazquez
Date: Tue Jan 10 17:00:43 2023 +0100
Branches: master
https://developer.blender.org/rBdb688b62f9e2d5a73d7bfaaac7cb0f5b2e8c1d6b
Fix T103764: Grease Pencil modes other than Draw use a wrong radial
It was introduced in commit https://developer.blender.org/rB0fb12a9c2ebc
The problem was that the tool uses the same values for all modes,
but the new calculation must be only for Draw mode.
Now the mode is checked.
===================================================================
M source/blender/editors/gpencil/gpencil_utils.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index 1f80cd06af2..a7895b94600 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -1786,7 +1786,8 @@ float ED_gpencil_radial_control_scale(struct bContext *C,
const int mval[2])
{
float scale_fac = 1.0f;
- if ((brush && brush->gpencil_settings) && (brush->gpencil_tool == GPAINT_TOOL_DRAW)) {
+ if ((brush && brush->gpencil_settings) && (brush->ob_mode == OB_MODE_PAINT_GPENCIL) &&
+ (brush->gpencil_tool == GPAINT_TOOL_DRAW)) {
float cursor_radius = ED_gpencil_cursor_radius(C, mval[0], mval[1]);
scale_fac = max_ff(cursor_radius, 1.0f) / max_ff(initial_value, 1.0f);
}
More information about the Bf-blender-cvs
mailing list