Sculpt: Add polyline hide operator #119483

Merged
Hans Goudey merged 17 commits from Sean-Kim/blender:polyline-hide into main 2024-04-29 14:04:28 +02:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit c8213169fe - Show all commits

View File

@ -1667,8 +1667,7 @@ enum ShapeType {
Box = 0,
Sean-Kim marked this conversation as resolved Outdated

I think the current name is fine, at least it's not worth adding a TODO here

I think the current name is fine, at least it's not worth adding a TODO here
/* In the context of a sculpt gesture, both lasso and polyline modal
* operators are handled as the same general shape.
* TODO: Rename to polygon? */
* operators are handled as the same general shape. */
Lasso = 1,
Line = 2,
};

View File

@ -37,6 +37,7 @@
#include "RNA_access.hh"
using blender::Array;
using blender::float2;
using blender::int2;
/* -------------------------------------------------------------------- */
@ -809,8 +810,8 @@ int WM_gesture_polyline_modal(bContext *C, wmOperator *op, const wmEvent *event)
break;
}
Sean-Kim marked this conversation as resolved
Review

const float2 cur(cur_x, cur_y);
same with orig

`const float2 cur(cur_x, cur_y);` same with `orig`
const float cur[2] = {float(cur_x), float(cur_y)};
const float orig[2] = {float(border[0][0]), float(border[0][1])};
const float2 cur(cur_x, cur_y);
const float2 orig(border[0][0], border[0][1]);
const float dist = len_v2v2(cur, orig);