GPv3: Soft mode for the Eraser tool #110310

Open
Amélie Fondevilla wants to merge 59 commits from amelief/blender:gpv3-erase-operator-soft-mode into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

59 Commits

Author SHA1 Message Date
74777f0e67 Fix build errors. 2024-05-07 15:25:51 +02:00
cbf049d1ad Merge branch 'main' into gpv3-erase-operator-soft-mode 2024-05-07 14:49:09 +02:00
02340eb723 Replace int64 by int for points and curves indices 2023-08-23 14:35:10 +02:00
8ddbbcc8ac Add comment 2023-08-23 14:34:56 +02:00
4b0c663ebe Small typo 2023-08-23 14:34:42 +02:00
94e6621f42 Removed unused variable 2023-08-23 14:29:53 +02:00
457c0516fa Remove debug print 2023-08-23 14:28:45 +02:00
b6a0227c6f Fix issues with cyclic curves 2023-08-23 14:28:45 +02:00
bde19d0eda Unify intersection functions for soft and hard eraser 2023-08-23 14:28:45 +02:00
9d1f9582d3 Edit comment 2023-08-23 14:28:45 +02:00
650eabf647 Refactor 2023-08-23 14:28:45 +02:00
b68e42a863 Fix error in intersection indices 2023-08-23 14:28:45 +02:00
1bf8061ea6 Refactor: use contiguous array instead of vectors 2023-08-23 14:28:45 +02:00
26c6eaaf8f Update initial factor for intersection to keep the sorting valid. 2023-08-23 14:28:45 +02:00
f5a5a9ca30 Fix missing update of the ring index in the case of one-point strokes 2023-08-23 14:28:45 +02:00
b60113c2e1 Keep caps option in UI also for soft eraser 2023-08-23 14:28:45 +02:00
e353ed0510 Cleanup: renaming functions 2023-08-23 14:28:45 +02:00
4b1a297bd9 Fix: remove 1px sample in curve falloff 2023-08-23 14:28:45 +02:00
9c92aa627b Cleanup falloff and rings
Cleanup
2023-08-23 14:28:45 +02:00
2ebdbd5fc5 Move up intersections functions 2023-08-23 14:28:45 +02:00
f806001bdf Cleanup: use Span instead of Array ref 2023-08-23 14:28:45 +02:00
d86286547d Comment format 2023-08-23 14:28:45 +02:00
24462cd88b Move recompute topology function 2023-08-23 14:28:45 +02:00
3c7476e24b Change the threshold 2023-08-23 14:28:45 +02:00
bd7b97c268 Cleanup 2023-08-23 14:28:45 +02:00
070ee21ee3 Fix point ring for cyclic curve 2023-08-23 14:28:45 +02:00
6bd5f848c6 Fix curve ring for one point stroke 2023-08-23 14:28:45 +02:00
f3134bc3ee Fix : remove succesive cuts 2023-08-23 14:28:45 +02:00
18bb575b33 Fix crash when attribute not found 2023-08-23 14:28:45 +02:00
9a84334d9e Simplify stroke after erasing 2023-08-23 14:28:45 +02:00
b47995aa9d Fix bug in the ring selection 2023-08-23 14:28:45 +02:00
50ddf0325a Cleanup 2023-08-23 14:28:45 +02:00
ad61aafc10 Fix inaccurate comment 2023-08-23 14:28:45 +02:00
0e0f363128 Piece-wise linear decomposition of the eraser's falloff 2023-08-23 14:28:45 +02:00
108ea06637 Set opacity with a naive sampling of the curve falloff 2023-08-23 14:28:45 +02:00
cd807e0956 Soft eraser with multiple radii 2023-08-23 14:28:45 +02:00
ce8c4c2117 Use the brush's falloff curve in the soft eraser 2023-08-23 14:28:45 +02:00
5640271192 Add the falloff curve UI in the eraser tool 2023-08-23 14:28:45 +02:00
fe02113e01 Update the paint settings function with the new grease pencil paint mode. 2023-08-23 14:28:45 +02:00
fcb7b32150 Add brush strength controller in the UI 2023-08-23 14:28:45 +02:00
4d4c053558 Fix: wrong map passed to gather attributes 2023-08-23 14:28:45 +02:00
a7e66779c0 Add descriptive comment for the soft eraser function 2023-08-23 14:28:45 +02:00
34237b96f9 Refactor: gather points attributes 2023-08-23 14:28:45 +02:00
378f8f1654 Use curve mapping to compute the eraser's strength 2023-08-23 14:28:45 +02:00
832f1e36c2 Add linear falloff 2023-08-23 14:28:45 +02:00
7de5ef4cc6 Cleanup 2023-08-23 14:28:45 +02:00
cc608cf792 Adjust grain sizes 2023-08-23 14:28:45 +02:00
24b0cd7e82 Renaming variables 2023-08-23 14:28:45 +02:00
0cc4694cd9 Refactor opacity copy (early return) 2023-08-23 14:28:45 +02:00
027dd5eb56 Refactor opacity copy (early return) 2023-08-23 14:28:45 +02:00
6dae3db420 Tag for changes only if changes were made 2023-08-23 14:28:45 +02:00
d6a90d5f7a Minor change 2023-08-23 14:28:45 +02:00
c979c498ee Clean up 2023-08-23 14:28:45 +02:00
c3ab483a9e The soft eraser now erases properly 2023-08-23 14:28:45 +02:00
4981da699a Wip: Attempt to refactor 2023-08-23 14:28:44 +02:00
67e2bed83c Delete points that are under an opacity threshold 2023-08-23 14:28:44 +02:00
fb1e300a98 Full copy of the source geometry 2023-08-23 14:28:44 +02:00
fc7c5da950 Decrease point opacity 2023-08-23 14:28:44 +02:00
6bca3ea6b1 Init soft eraser operator 2023-08-23 14:28:44 +02:00