Commit Graph

1230 Commits

Author SHA1 Message Date
Campbell Barton
f927eef166 Cleanup: remove unused variables in startup scripts 2024-03-07 13:29:18 +11: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
Sean Kim
705964d7bb Sculpt: Migrate Box Hide to common gesture code
This PR migrates the existing `PAINT_OT_hide_show` operator to the
previously extracted `gesture` namespace performed in #118881

The current operator has support for choosing whether the hide / show
action is performed on every vertex inside or outside the selection
area. This has been added to the common gesture functionality too,
but no common operator property has been exposed for it for the other
Lasso / Box tools to use.

Other modes of the current "hide_show" operator have been split
into separate operators: `PAINT_OT_hide_show_all` and
`PAINT_OT_hide_show_masked`.

Prerequisite for #80390

Pull Request: https://projects.blender.org/blender/blender/pulls/119040
2024-03-06 05:25:43 +01:00
Campbell Barton
95273b0c23 License headers: add SPDX headers 2024-03-06 14:43:14 +11:00
Hans Goudey
38208ed153 Fix #119099: Distribute points in volume node missing in add menu
Mistake in 860f3ed794
2024-03-05 16:11:09 -05:00
Omar Emara
eb91828aab GPU: Add maximum image units to GPU capabilities
This patch adds the maximum number of supported image units to the GPU
capabilities module. Currently, the GPU module assume a maximum of 8
units, so the patch is not currently particularly useful, but we can
consider committing it for the future anyways.

Pull Request: https://projects.blender.org/blender/blender/pulls/119057
2024-03-05 07:25:20 +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
Sebastian Parborg
6290ead143 Merge branch 'blender-v4.1-release' 2024-03-04 16:53:54 +01:00
Pratik Borhade
797b9f65e6 GPv3: Select mode in Edit Mode keymap
Keymap to switch between points and stroke edit mode with 1 and 2 key resp.

Pull Request: https://projects.blender.org/blender/blender/pulls/119049
2024-03-04 12:16:25 +01:00
Bastien Montagne
afb5cb440b Fix/tweak UI messages (typos etc.). 2024-03-04 11:17:55 +01:00
Sietse Brouwer
ad8180c54c GPv3: Copy and Paste operators for copying strokes and points
This PR implements the Copy and Paste operators for GPv3. The operators
are available in Edit Mode. The Copy operator copies the selected strokes/
points to a clipboard. The Paste operator pastes the  strokes/points from
the clipboard to the active layer.

Keyboard shortcuts:
- `Ctrl`-`C` for copy
- `Ctrl`-`V` for paste
- `Ctrl`-`Shift`-`V` for paste in the back (behind all existing strokes)

Pull Request: https://projects.blender.org/blender/blender/pulls/114145
2024-03-04 11:02:25 +01:00
Harley Acheson
6fd0f384d7 UI: Add Title to Extensions Repo Popover
Just adds a "Repositories" title to the repo popover in
Properties / Extensions.

Pull Request: https://projects.blender.org/blender/blender/pulls/119009
2024-03-02 19:10:20 +01:00
Jacques Lucke
b879772004 Merge branch 'blender-v4.1-release' 2024-03-01 22:40:23 +01:00
Jacques Lucke
8f36281787 Nodes: expose ordering of links in multi input socket in Python
This fixes #116096 and is based on #115249 with some changes.

This patch contains three changes:
* `NodeSocket.links` in the Python API gives the links in the correct order.
* `NodeLink.multi_input_sort_id` gives read-only access to an id that's used
  for sorting. Note that for historical reasons the highest id is the first link.
* `NodeLink.swap_multi_input_sort_id(other_link)` provides a safe way to
  change the order of links connected to a multi-input socket.

Co-authored-by: Adrian Bibby Walther <adrianbibbywalther@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/118987
2024-03-01 22:36:10 +01:00
persun
8bcfe66d22 UI: Add label to sculpt symmetrize options
Add label to the sculpt symmetrize options.

With no label user may confuse if other symmetry options
above are related to the symmetrize operation.
Also reorder them so the actual operation button to go bottom.

Pull Request: https://projects.blender.org/blender/blender/pulls/112915
2024-03-01 22:28:45 +01:00
Philipp Oeser
b96770f692 Merge branch 'blender-v4.1-release' 2024-03-01 16:43:26 +01:00
Sybren A. Stüvel
1c5766f8bc Fix #118878: Anim: pinned bone custom properties not visible in edit-mode
Use `context.edit_bone` when available. This also properly accounts for
pinning of the armature.
2024-03-01 15:20:40 +01:00
Casey Bianco-Davis
bf6f9ea2da GPv3: Draw tool set caps types
Adds functionally to sets the cap type of the drawn stroke.

Pull Request: https://projects.blender.org/blender/blender/pulls/118950
2024-03-01 10:45:02 +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
Campbell Barton
a972988a20 Merge branch 'blender-v4.1-release' 2024-03-01 09:30:26 +11:00
Campbell Barton
f4cc984038 Fix #116844: Transform -> Move shows mouse button shortcut
The order key-maps are stored changed in [0], causing the mouse button
shortcut to be shown instead of the "G" key.

[0]: d7558a243c
2024-03-01 09:22:02 +11:00
Miguel Pozo
4083f8004d EEVEE-Next: Add Shadows PCF
Add percentage closer filtering to shadowmap sampling and a
`shadow_filter_radius` property to lights to control it.

Notes:
* This adds PCF to `eevee_shadow_tracing_lib`, but not to
  `eevee_shadow_lib`, which is used by volumes (not required) and
  thickness.
* PCF is computed based on the LOD0 size. This assumes that higher
  LODs are only used when the shadowmap resolution is actually good
  enough to match the render resolution.

Pull Request: https://projects.blender.org/blender/blender/pulls/118220
2024-02-29 15:47:16 +01:00
Jacques Lucke
8b3af6a68c Cleanup: make format 2024-02-29 14:22:33 +01:00
Pratik Borhade
e67059d504 GPv3: Isolate Layer keymap
Missed in 0228994d6d
Also include this keymap in draw mode, see: #118806

Pull Request: https://projects.blender.org/blender/blender/pulls/118894
2024-02-29 10:49:08 +01:00
Casey Bianco-Davis
c43736c7f4 GPv3: Draw tool side panel
This adds the `brush select`, `mix color` and `color palette` to the side panel. Same as the legacy panels.

Pull Request: https://projects.blender.org/blender/blender/pulls/118762
2024-02-29 10:44:19 +01:00
Campbell Barton
4e60a68d21 Merge branch 'blender-v4.1-release' 2024-02-29 18:15:50 +11:00
Campbell Barton
f647e1a5b7 Weight Paint: expose all pose mode selection tools
Pose-mode selection tools (box, lasso & circle select) now support
pose-mode when weight-painting.

Changes to the key-map [0] caused a regression where it was no longer
possible to select multiple bones because Shift-LMB is now used for
painting. The report #114981 proposes to support pose selection tools
in weight paint mode.

Note that in [1] added the tweak tool, this completes the change by
supporting other tools & fixing W-key shortcut access.

Resolves #114981.

[0]: 6de6d7267f
[1]: edcac1f48b
2024-02-29 18:12:50 +11:00
Campbell Barton
b099108178 Merge branch 'blender-v4.1-release' 2024-02-29 14:02:58 +11:00
Campbell Barton
d5598838a2 Fixes for operator preset cleanup utility
Various fixes to operator preset cleanup:

- Only remove properties that match exactly the properties to exclude
  exactly (taking word boundaries into account).
- When the preset path doesn't exist, don't construct paths relative
  to the working directory.
- Enforce UTF8 encoded text.

Other minor changes:

- Rename "properties" to "properties_exclude" for clarity.
- Use single underscore for private methods.
- Match each line against a single regex instead of constructing a
  string and checking startswith(..) for every property to exclude.
- Use os instead of pathlib, as us used in blender's built in operators
  that handle paths.
- Prefer doc-string over bl_description.
- Double quote strings.
- Use single indentation for lists to reduce right-shift.
2024-02-29 14:00:05 +11:00
Hans Goudey
860f3ed794 Geometry Nodes: Add volume grid conversion nodes
Adds two nodes as "grid" equivalents to the existing volume nodes:
- **Grid to Mesh**
- **Distribute Points in Grid**

The code for the latter is just duplicated for now. In a later step
old node can be replaced by versioning with two new nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/118830
2024-02-29 01:20:27 +01:00
Hans Goudey
bea33a6be9 Geometry Nodes: Add volume grid creation nodes
Add three nodes to the currently experimental volume grid nodes:
- **Mesh to Density Grid**
- **Mesh to SDF Grid**
- **Points to SDF Grid**

These nodes are just wrappers over basic OpenVDB utilities.
The difference from existing volume nodes is that they output
a grid directly instead of a geometry set.

See the design here: https://devtalk.blender.org/t/volumes-in-geometry-nodes-proposal/31917

Pull Request: https://projects.blender.org/blender/blender/pulls/118761
2024-02-28 22:15:10 +01:00
YimingWu
d296c66ab1 GPv3: Show Line Art options in Object > Add menu
The Object > Add > Grease Pencil menu will now show Scene/Collection/Object Line Art
options.

Pull Request: https://projects.blender.org/blender/blender/pulls/118833
2024-02-28 16:20:48 +01:00
Campbell Barton
976cd8c211 Cleanup: follow RNA naming conventions for boolean types
- Use `use_*_interpolate` matching sequencers use_frame_interpolate.
- Use `use_uniform_scale` matching sequencers use_uniform_scale.
2024-02-28 12:13:15 +11:00
Campbell Barton
4f8db2ee67 Cleanup: use static sets for contains checks, remove f-string use 2024-02-28 11:02:49 +11:00
Harley Acheson
f04bd961fd UI: Manage Unused Data Operator
An operator that brings up a window with Outliner in "Unused Data" mode
to allow users fine-grained control over protecting and purging.

Pull Request: https://projects.blender.org/blender/blender/pulls/118435
2024-02-27 23:47:40 +01:00
XDzZyq
999dfce736 Sculpt: Add interpolate radius option for curve radius
Add the option to interpolate the radius from nearby curves and
add a fallback radius for when interpolation is turned off or when
there are no neighbors.

Resolves #117101

Pull Request: https://projects.blender.org/blender/blender/pulls/118339
2024-02-27 18:22:03 +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
Pratik Borhade
7ae8e1dc07 GPv3: Select strokes by material operator
Port legacy gp operator `GPENCIL_OT_material_select`

Pull Request: https://projects.blender.org/blender/blender/pulls/118652
2024-02-25 08:18:58 +01:00
Campbell Barton
3edd6ae69b UI: remove directory button label in extensions & add doc-string 2024-02-23 15:18:02 +11:00
Campbell Barton
92987cbe4a Extensions: user interface improvements
- Remove name from "Add Remote Repository" popup,
  the name is set automatically based on the host-name.
- URL text field is active for new remote repositories,
  the name field is active for local repositories.
- When the custom-path is disabled, show the automatically created
  directory name which is used.
- Use the host-name for the repository name when version patching
  user preferences.

Resolves #118638 design task.
2024-02-23 14:59:30 +11:00
Campbell Barton
86954de57a RNA: move the read-only extension "directory" to RNA
This allows it to be exposed in the user interface when the
custom-directory is disabled without having to use a label which can't
handle non UTF-8 characters which file-paths can contain.
2024-02-23 14:57:05 +11:00
Hans Goudey
77cba3d551 Geometry Nodes: Sample grid node
This simple node finds the values of a volume grid at
positions in the local space used in geometry nodes
evaluation. There are three interpolation modes to
choose how to mix values between neighboring voxels.

For the implementation, first the values are sampled
with the grid's type directly, then implicit type conversions
are used to get the final type. This makes gives us flexibility
in case there aren't exact matches in support between grid
types and Blender types.

Pull Request: https://projects.blender.org/blender/blender/pulls/118397
2024-02-22 17:58:09 +01:00
Bastien Montagne
f15f57c5ea GPv3: Add layer 'pass_index' attribute.
Add this data as a layer attribute. It's usage was already implemented
by the modifier filtering generic code, but data itself did not yet
exist in GPv3 data.

Also add RNA accessors and handle it in conversion code.

Pull Request: https://projects.blender.org/blender/blender/pulls/118495
2024-02-22 14:53:48 +01:00
Dalai Felinto
1860110fa8 Extensions: Update addon_enable/disable name and tooltip
Ideally the operator itself should be renamed, but I went the conservative approach
since themes are not supported yet. Once they are supported I suppose the operators
could be unified.
2024-02-21 15:42:59 +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
Philipp Oeser
a2a03252c6 Cleanup: remove references to FLUID from point_cache_ui
Fluid (Smoke/Liquid) has its own UI (uses `PHYSICS_PT_cache` in
`properties_physics_fluid.py`), does not use `point_cache_ui` at all.

It seems 4235fe37d6 should have done this already.

Afaict, this is also not relevant for loading old (e.g. 2.79) files with
the old smoke system (since their caches wont be read anyways).

Pull Request: https://projects.blender.org/blender/blender/pulls/117404
2024-02-21 10:18:47 +01:00
Campbell Barton
b0fb693e1b Extensions: sort repositories based on type & name
The creation order was used which isn't especially meaningful.
Sort remote repositories first, then by name.
2024-02-21 09:59:47 +11:00
Dalai Felinto
4ceccb23df Extensions: change the icon of remote repositories
We were using the WORLD data-block icon before which is misleading.

Ref: !118521
2024-02-21 09:53:05 +11:00