GPv3: Set Uniform operator for Thickness and Opacity #114006

Merged
Antonio Vazquez merged 20 commits from antoniov/blender:GPv3_normalize into main 2023-11-08 16:19:10 +01:00

20 Commits

Author SHA1 Message Date
Antonio Vazquez 7172784cd1 Merge branch 'main' into GPv3_normalize
Conflicts:
	source/blender/editors/grease_pencil/intern/grease_pencil_edit.cc
2023-11-08 16:15:41 +01:00
Antonio Vazquez 79a1ace8d5 Merge branch 'main' into GPv3_normalize
Conflicts:
	source/blender/editors/grease_pencil/intern/grease_pencil_edit.cc
2023-11-08 16:02:57 +01:00
Antonio Vazquez ad6962b2c9 Cleanup: Remove unused include 2023-11-08 12:00:33 +01:00
Antonio Vazquez 4336411c84 GPv3: Rename Radius to Thickness
Also divide Thickness by 2 because radius is half thickness.
2023-11-07 15:57:25 +01:00
Antonio Vazquez a8a95b92ff Merge branch 'main' into GPv3_normalize 2023-11-07 15:47:32 +01:00
Antonio Vazquez b4a2847f23 GPv3: Update to new multiframe API 2023-11-02 17:42:35 +01:00
Antonio Vazquez f0e644bb6a Merge branch 'main' into GPv3_normalize 2023-11-02 17:20:49 +01:00
Antonio Vazquez 56f7a111f7 GPv3: Add `_uniform_` to the operator name 2023-11-01 16:15:26 +01:00
Antonio Vazquez 7f9854dd41 GPv3: Split Normalize op in two operators
* GREASE_PENCIL_OT_set_opacity
* GREASE_PENCIL_OT_set_thickness
2023-11-01 12:10:29 +01:00
Antonio Vazquez 18f93dddcc Cleanup: Remove extra blank line 2023-11-01 10:46:58 +01:00
Antonio Vazquez 6d749d8dee GPv3: More cleanup to make it faster
* Moved the enum inside operator definition.
* Mutable span is only get if needed..
2023-11-01 10:45:26 +01:00
Antonio Vazquez 78a4427ce6 GPv3: Remove default case
Now this is not required
2023-10-31 18:59:32 +01:00
Antonio Vazquez a09b9baedf GPv3: Use switch instead of if 2023-10-31 18:53:32 +01:00
Antonio Vazquez 443589b999 GPv3: Use curve bke functions and avoid span read in loop 2023-10-31 18:00:08 +01:00
Antonio Vazquez 73e806b14b Cleanup: Revert format 2023-10-31 17:58:16 +01:00
Antonio Vazquez a9ead96380 Cleanup: Make format 2023-10-31 17:27:09 +01:00
Antonio Vazquez 3572647f57 GPv3: Remove loop and replace with fill
Following Pratik Borhade advice, the loop
has been replaced with fill function.
2023-10-22 10:23:15 +02:00
Antonio Vazquez d8dc8599a2 GPv3: Fixes after first review 2023-10-21 23:46:13 +02:00
Antonio Vazquez 24bb0a23d1 GPv3: Cleanup code and remove duplicate checks 2023-10-21 23:44:44 +02:00
Antonio Vazquez 0304809a16 GPv3: Normalize Stroke operator
This operator has the same functionality that GPv2 version.

Note: The radius is set with the entry value. In GPv2 the radius
was relative to the stroke thickness. Maybe we need review this.
2023-10-21 16:58:05 +02:00