Commit: fb09bc3c35b7544c46c13cc322421419948a3d52 Author: Pablo Dobarro Date: Wed Sep 2 22:30:36 2020 +0200 Branches: master https://developer.blender.org/rBfb09bc3c35b7544c46c13cc322421419948a3d52
Fix T80311: Sculpt Filters not working when using vertical split All filters were using prevclicx, which is in screen coordinates and mval[0], which is in region coordinates to get the filter strength. This fixes the issue in all filters. Reviewed By: Severin Maniphest Tasks: T80311 Differential Revision: https://developer.blender.org/D8776 =================================================================== M source/blender/editors/sculpt_paint/sculpt_cloth.c M source/blender/editors/sculpt_paint/sculpt_filter_color.c M source/blender/editors/sculpt_paint/sculpt_filter_mesh.c =================================================================== diff --git a/source/blender/editors/sculpt_paint/sculpt_cloth.c b/source/blender/editors/sculpt_paint/sculpt_cloth.c index c3666c8aaad..a95e4f7008c 100644 --- a/source/blender/editors/sculpt_paint/sculpt_cloth.c +++ b/source/blender/editors/sculpt_paint/sculpt_cloth.c @@ -1241,7 +1241,7 @@ static int sculpt_cloth_filter_modal(bContext *C, wmOperator *op, const wmEvent return OPERATOR_RUNNING_MODAL; } - float len = event->prevclickx - event->mval[0]; + const float len = event->prevclickx - event->x; filter_strength = filter_strength * -len * 0.001f * UI_DPI_FAC; SCULPT_vertex_random_access_ensure(ss); diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_color.c b/source/blender/editors/sculpt_paint/sculpt_filter_color.c index c5acf736f3e..89af836d095 100644 --- a/source/blender/editors/sculpt_paint/sculpt_filter_color.c +++ b/source/blender/editors/sculpt_paint/sculpt_filter_color.c @@ -228,7 +228,7 @@ static int sculpt_color_filter_modal(bContext *C, wmOperator *op, const wmEvent return OPERATOR_RUNNING_MODAL; } - float len = event->prevclickx - event->mval[0]; + const float len = event->prevclickx - event->x; filter_strength = filter_strength * -len * 0.001f; float fill_color[3]; diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c index 619a1b975b6..1cbf9275a56 100644 --- a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c +++ b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c @@ -636,7 +636,7 @@ static int sculpt_mesh_filter_modal(bContext *C, wmOperator *op, const wmEvent * return OPERATOR_RUNNING_MODAL; } - float len = event->prevclickx - event->mval[0]; + const float len = event->prevclickx - event->x; filter_strength = filter_strength * -len * 0.001f * UI_DPI_FAC; SCULPT_vertex_random_access_ensure(ss); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs