73 Commits

Author SHA1 Message Date
Jacques Lucke
33aa6fac90 Fix: Assets: assets have been moved without updating the code
The assets were moved in 1aaa540763.
2025-10-02 20:09:37 +02:00
Simon Thommes
43fbbc95bc Modifiers: Add icons to remaining modifier assets in Generate category
This adds new icons for the remaining two modifier Essentials assets
bundled with Blender in the `Generate` category.
(`Curve to Tube` and `Scatter on Surface`)

Pull Request: https://projects.blender.org/blender/blender/pulls/147115
2025-10-01 15:50:34 +02:00
Hans Goudey
59aa61b8be UI: Interleave essentials modifiers in "Generate" menu
Hardocde the position of the essentials assets in the menu,
for consistent alphabetical order and a clearer indication of
the different between the nodes and builtin "Array" modifiers
(the old one is now called "Array (Legacy)").

Pull Request: https://projects.blender.org/blender/blender/pulls/146887
2025-09-29 16:37:35 +02:00
Dalai Felinto
420dfebbb8 UI: Add Modifier: Move Geometry Nodes last
With Blender 5.0 a few modifier assets are bundled. This makes the
Geometry Nodes modifier even more of a special modifier which isn't
intended for many people to use.

As such this PR moves it to the end to be a bit less prominent.

| 4.5 | PR | PR |
| - | - | - |
|<img width="217" alt="Screenshot 2025-09-22 at 16.10.17.png" src="attachments/c12fedc4-549e-4b7b-bc28-c990e17a679e">|<img width="182" alt="Screenshot 2025-09-22 at 16.11.18.png" src="attachments/ce80702e-95dd-441a-8d36-c41f64d03a64">|<img width="214" alt="Screenshot 2025-09-22 at 16.11.45.png" src="attachments/5b07d5e9-b133-4fc5-a5a4-a1989929e58e">|

The PR column shows the changes proposed here in two scenarios: with and another without Unassigned assets.

Ref: !146590
2025-09-22 18:59:36 +02:00
Campbell Barton
be0c9174aa Cleanup: argument wrapping for Python scripts
- Wrap the closing parenthesis onto it's own line
  which makes assignments to the return value
  read better.
- Reduce right-shift with multi-line function calls.
2025-01-14 12:53:32 +11:00
Hans Goudey
91e1031c42 Fix #132079: Python error when adding modifier on Surface object
It looks like the Mesh Sequence Cache modifier isn't supported
for this object type.
2024-12-18 13:17:27 -05:00
Campbell Barton
c1951f6508 Cleanup: remove unused variables 2024-12-14 23:17:48 +11:00
Thomas Dinges
f3e5c17283 Cleanup: Remove legacy GPENCIL code from UI python files.
Also remove unused gpencil modifier defines.

Pull Request: https://projects.blender.org/blender/blender/pulls/131879
2024-12-14 11:19:24 +01:00
Campbell Barton
a7bc3e3418 Cleanup: quiet Python linter warnings 2024-12-11 11:26:24 +11:00
quackarooni
ab051e1f17 Fix: GPv3: "Lineart" and "Opacity" modifier don't follow alphabetical order
The `Lineart` and `Opacity` modifier appear at the bottom of their respective
menus instead of following alphabetical order. There doesn't seem to be any
conceivable reason to do this, and it is inconsistent with how the modifiers
were laid out in older Blender versions. Fixes the order of the modifiers.

Pull Request: https://projects.blender.org/blender/blender/pulls/130080
2024-11-10 12:20:31 +01:00
Philipp Oeser
3b9a07d49a Fix #128746: SequenceCache modifier not available in dropdown for Curves
In a Curves (not Curve) object, the MeshSequenceCache modifier is not
available from the "Add Modifier" dropdown.

However, the Alembic importer adds such a modifier onto the Curves
objects it creates. It is also possible to transfer such a modifier from
another object, regardless of its type.
Thus, this seems not to be an issue of compatibility of the modifier
with the Curves object type, but an UI/UX oversight.

`BKE_object_support_modifier_type_check` already has a correct check for
this, so just adding CURVES support to the appropriate menu.

Same is true for the POINTCLOUD type, so adding that as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/128756
2024-10-09 13:02:15 +02:00
Hans Goudey
b0eb48c4dc UI: Move Normal Edit and Weighted Normal modifiers to "Normals" menu
Though the whole modifier menu could use a reorganization, it probably doesn't
make sense to do that before we have a builtin library of node group assets.
We already have the "Normals" category though, so these two modifiers make
more sense there.

Pull Request: https://projects.blender.org/blender/blender/pulls/122168
2024-05-23 18:28:31 +02:00
Hans Goudey
e63c8bb3c2 UI: Add Modifiers submenu to 3D view header
Add a menu similar to the "Object > Constraints" menu that allows adding,
copying, and clearing modifiers. The "copy all modifiers to selected" and
"clear modifiers" operators are new, to mirror the functionality we already
have for constraints.

The "Add" menu is the same that's used in the property editor. In the 3D
view, modifiers are always added to all selected objects.

Part of #120230

Pull Request: https://projects.blender.org/blender/blender/pulls/121286
2024-05-01 14:15:53 +02:00
Campbell Barton
56388dc8fe Cleanup: reduce right-shift in startup scripts
Also un-wrap lines that fit in the column width.
2024-04-30 12:46:05 +10:00
Hans Goudey
9a7f4a3b58 Modifiers: Affect all selected objects when holding alt
Support holding alt while invoking modifier operations for add, apply,
remove, and move to index in the property editor. This affects all selected
editable objects instead of just the active object.

Though the alt key is not that visible, it's consistent with the
existing multi-object property editing shortcut. If/when multi-
object editing is every made the default, the alt key could
be reversed here too.

Changes as part of #120230.

Pull Request: https://projects.blender.org/blender/blender/pulls/120695
2024-04-18 17:40:50 +02:00
Lukas Tönne
d7c718dfd4 GPv3: Texture offset modifier
Port of the GPv2 texture modifier for transforming UVs of stroke points.

Pull Request: https://projects.blender.org/blender/blender/pulls/119050
2024-03-29 21:42:30 +01:00
Falk David
8b7d5f8587 GPv3: Simplify Modifier
Implements the GPv2 simplify modifier.

Pull Request: https://projects.blender.org/blender/blender/pulls/120018
2024-03-28 18:16:14 +01:00
Falk David
5a6a9349e0 Revert "GPv3: Simplify modifier"
This reverts commit 279b8b5748.

The PR wasn't accepted.
2024-03-28 15:23:42 +01:00
YimingWu
279b8b5748 GPv3: Simplify modifier
Implements the simplify modifier from GPv2.

Co-authored-by: Falk David <falk@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/118546
2024-03-28 15:18:33 +01:00
YimingWu
3689dfca4f GPv3: Build Modifer migration
Reimplemented build modifier using the new `CurvesGeometry` logic.

Pull Request: https://projects.blender.org/blender/blender/pulls/118739
2024-03-20 13:28:28 +01:00
Lukas Tönne
f51e93bec7 GPv3: Shrinkwrap modifier
Port of shrinkwrap modifier from GPv2.

Adds a new API function in `BKE_shrinkwrap.hh` for the modifier.

Pull Request: https://projects.blender.org/blender/blender/pulls/119118
2024-03-06 12:05:00 +01:00
Lukas Tönne
d6aadd6692 GPv3: Outline modifier
Port of GPv2 outline modifier.

Pull Request: https://projects.blender.org/blender/blender/pulls/118911
2024-03-04 16:54:07 +01:00
Lukas Tönne
68c12fe0ec GPv3: Envelope Modifier
Ports the Envelope modifier from GPv2.

Pull Request: https://projects.blender.org/blender/blender/pulls/118272
2024-03-01 10:42:41 +01:00
Lukas Tönne
c6e5e62f45 GPv3: Time offset modifier
Port of the Time Offset modifier from GPv2.

Pull Request: https://projects.blender.org/blender/blender/pulls/118371
2024-02-27 14:17:22 +01:00
Lukas Tönne
5599172499 GPv3: Armature Modifier
Armature deformation modifier for Grease Pencil v3.

Changes compared to GPv2:
- `multi` DNA field was unused and was removed.
- `vert_coords_prev` array is unused and was removed (gets passed to
  armature functions but never gets allocated).
- GPv3 modifier uses the common `influence` struct to store the vertex
  group name, for consistency. The
  `GREASE_PENCIL_INFLUENCE_INVERT_VERTEX_GROUP` flag is copied to
  `deformflag` as `ARM_DEF_INVERT_VGROUP` before evaluation, which is
  used internally by armature functions.
- `BKE_armature_deform_coords_with_curves` is added as another variant
  of the deform function, but uses C++ parameter types (spans instead
  of raw pointers). It gets a `Span<MDeformVert>` directly instead of
  deducing it internally from the object type. This is because we want
  to do this curve-by-curve and already use arbitrary vector spans for
  positions.

Pull Request: https://projects.blender.org/blender/blender/pulls/118752
2024-02-26 19:36:10 +01:00
YimingWu
3d1cdfe2ca GPv3: Line Art Modifier
This is a migration of the current Line Art modifier to GPv3.

Note:
- The modifier is using the exact same DNA structure as the old one, it's re-defined in a different name. At the moment all the variable names and placement after the `ModifierData` part should stay exactly the same until we do proper versioning of the modifier data and completely remove the GPv2 support.
- Vertex weight transfer feature no longer supports name initial matching ("group" used to match "group1","group2" etc). Now it will only transfer vertex weight from source vertex groups that has the exact same name as specified.

Pull Request: https://projects.blender.org/blender/blender/pulls/117028
2024-02-26 15:28:15 +01:00
YimingWu
2225ce8202 GPv3: Hook modifier
Migrates the Hook modifier to Grease Pencil v3.

Pull Request: https://projects.blender.org/blender/blender/pulls/118452
2024-02-21 14:20:47 +01:00
YimingWu
ae20873250 GPv3: Weight proximity modifier
This migrates the Weight proximity modifier to GPv3.

Pull Request: https://projects.blender.org/blender/blender/pulls/118363
2024-02-19 11:16:38 +01:00
YimingWu
975c226282 GPv3: Array Modifier
This migrates the Array modifier to Grease Pencil v3.

Pull Request: https://projects.blender.org/blender/blender/pulls/117836
2024-02-16 14:04:01 +01:00
YimingWu
ace5c9af2a GPv3: Vertex Weight Angle modifier
This ports the Vertex Weight Angle modifier to Grease Pencil v3.

Pull Request: https://projects.blender.org/blender/blender/pulls/117846
2024-02-16 12:30:43 +01:00
YimingWu
b661b368c4 GPv3: Length modifier
This ports the length modifier to Grease Pencil v3.

Pull Request: https://projects.blender.org/blender/blender/pulls/117124
2024-02-15 16:37:54 +01:00
YimingWu
76b0976500 GPv3: Multiple Strokes Modifier
This migrates the multiple strokes modifier to Grease Pencil v3.

Pull Request: https://projects.blender.org/blender/blender/pulls/117796
2024-02-15 14:19:50 +01:00
Lukas Tönne
2c8de207b7 GPv3: Dash modifier
Reimplements the "Dash" (aka Dash-Dot) modifier of GPv2.

Pull Request: https://projects.blender.org/blender/blender/pulls/117758
2024-02-08 15:35:20 +01:00
Lukas Tönne
da2d3be202 GPv3: Lattice modifier
Ported lattice modifier from GPv2.

The `LatticeDeformData` is no longer stored in the modifier data, but calculated on-the-fly like in the mesh deform modifier. This is quite trivial data and only stores deformed positions of the lattice, so not really worth the effort and complexity of caching it.

Pull Request: https://projects.blender.org/blender/blender/pulls/117955
2024-02-08 14:09:11 +01:00
Falk David
898ff6ceee Revert "GPv3: Array modifier"
This reverts commit e1ce3c3cc7.
2024-02-01 16:18:13 +01:00
YimingWu
e1ce3c3cc7 GPv3: Array modifier
Grease Pencil Array modifier migrated to GPv3.

All features now working as expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/117722
2024-02-01 15:58:53 +01:00
YimingWu
4722c801c5 GPv3: Thickness modifier
Thickness modifier ported to Grease Pencil v3.

Note: Uniform thickness range and UI step changed to better
match new thickness of blender unit.

![image](/attachments/2e9c9bfa-d869-4bec-a529-c3833390a201)

Pull Request: https://projects.blender.org/blender/blender/pulls/117631
2024-01-30 13:04:30 +01:00
Lukas Tönne
0daa426739 GPv3: Mirror modifier
Implements the mirror modifier from GPv2.

Pull Request: https://projects.blender.org/blender/blender/pulls/117637
2024-01-30 12:10:33 +01:00
YimingWu
56439d88f5 GPv3: Noise modifier
This ports the noise modifier to GPv3.
There should be no functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/117057
2024-01-29 16:49:16 +01:00
Lukas Tönne
7e87513368 GPv3: Offset modifier
Ported the Offset modifier from GPv2.

Pull Request: https://projects.blender.org/blender/blender/pulls/117446
2024-01-24 16:57:58 +01:00
YimingWu
b6e5b02ede Cleanup: GPv3: Use consistent modifier RNA names
"GREASEPENCIL_" changed to "GREASE_PENCIL_".
2024-01-24 21:20:42 +08:00
YimingWu
f54348edc9 GPv3: Smooth modifier
Smooth modifier ported to Grease Pencil 3.0

Exposed `smooth_curve_attribute()` from `grease_pencil_edit.cc`
to achieve the smoothing effect. It will not be the exact same result
as the old algorithm.

Pull Request: https://projects.blender.org/blender/blender/pulls/116975
2024-01-24 04:36:36 +01:00
Lukas Tönne
baeb4d7753 GPv3: Tint and Color modifiers
Implements the Tint and Color (aka. "Hue/Saturation") modifiers.

Pull Request: https://projects.blender.org/blender/blender/pulls/117297
2024-01-19 16:59:39 +01:00
Lukas Tönne
b157b80462 Grease Pencil: Use a "Color" modifier category for GP2 compatibility
This will be used for Opacity/Tint/Color modifiers which change color
attributes of grease pencil objects. The category is not shown for other
object types.
2024-01-19 11:35:26 +01:00
YimingWu
4d387843e9 GPv3: Subdivide Modifier
This ports the Subdivide modifier from GPv2.

Pull Request: https://projects.blender.org/blender/blender/pulls/117056
2024-01-18 13:02:53 +01:00
Lukas Tönne
c02f3c94d9 GPv3: Opacity modifier
Opacity modifier implementation based on GP2.
Functionality is largely unchanged.

_Color Mode_ is either `Stroke` or `Fill` for modifying color opacity or
`Hardness`.
_Uniform Opacity_ does two things at once (!):
- Sets the same opacity value for every point in a stroke.
- Sets opacity as an absolute value rather than a factor.

_Weight as Factor_ (button to the right of Opacity Factor): Use the
vertex group as opacity __factor__ rather than an overall __influence__.
This is confusing and hard to convey, but copies behavior from GP2.

The _Influence_ panel contains the same filter settings as the GP2
modifier, with some small changes:
- _Layer_ selects only strokes in the respective layer (with an _Invert_
  option)
- _Material_ selects only points with the respective material (with an
  _Invert_ option)
- _Layer Pass_ and _Material Pass_ select only strokes/points which are
  rendered in the respective pass.
  _Note 1: Layers don't have UI for setting a pass yet, this will be a
  generic layer attribute. This can be set through the API for testing._
  _Note 2: In GP2 a pass value of zero was used to disable pass filters.
  Since zero is a valid pass ID an explicit flag has been added for the
  purpose of turning pass filters on and off._
- _Vertex Group_: This can be used as an additional influence filter on
  points. If _Weight as Factor_ is enable the vertex group instead
  replaces the opacity factor. In _Fill_ mode the vertex group weight of
  the stroke's first point is used as influence for the entire stroke.
- _Custom Curve_ is another possible influence factor per point. The
  curve input value is the relative position of a point along its
  stroke.

The Influence settings have been moved into a separate DNA struct, which
should help with reusability in various modifiers. Various utility
functions can be found int `MOD_grease_pencil_util.hh` for handling
influence settings and generating `IndexMasks` for modernized C++ code.

Pull Request: https://projects.blender.org/blender/blender/pulls/116946
2024-01-16 16:56:14 +01:00
Hans Goudey
d0ce1ca173 Merge branch 'blender-v4.0-release' 2023-11-09 11:58:29 +01:00
Falk David
ff5df8a78f Fix #114564: Can't search grease pencil modifiers
The grease pencil modifier list hasn't been converted to a menu yet.
This fixes the issue by filtering out grease pencil objects in
the search poll function.

Pull Request: https://projects.blender.org/blender/blender/pulls/114665
2023-11-09 11:57:07 +01:00
Brecht Van Lommel
39107b3133 Revert changes from main commits that were merged into blender-v4.0-release
The last good commit was 8474716abb.

After this commits from main were pushed to blender-v4.0-release. These are
being reverted.

Commits a4880576dc from to b26f176d1a that happend afterwards were meant for
4.0, and their contents is preserved.
2023-10-30 21:40:35 +01:00
Hans Goudey
030932e8df Merge branch 'blender-v4.0-release' 2023-10-15 20:31:50 +02:00