Commit Graph

111963 Commits

Author SHA1 Message Date
Jacques Lucke
0811cbbbc6 Fix #125758: deduplicate warnings shown in geometry nodes 2024-08-01 11:15:55 +02:00
Christoph Lendenfeld
a2b53f47dd Fix #125509: Reordering of channels doesn't work in Graph Editor
The reordering of channels didn't work in the following case:
* in the Graph Editor
* Channels outside of a FCurve group

The reason for that was that any channels outside a group get added to a temp group
(sorting somehow depends on groups) and that was missing the `AGRP_EXPANDED_G`
flag. The reason this was only broken in the Graph Editor was that this flag is only used
for the graph editor. The `EXPANDED_AGRP` macro has a special case for that
(used towards the end of `rearrange_action_channels`).

Pull Request: https://projects.blender.org/blender/blender/pulls/125673
2024-08-01 10:55:49 +02:00
Hans Goudey
c502368141 Cleanup: Sculpt: Avoid PBVHVertRef for accessing cloth positions 2024-07-31 23:55:54 -04:00
Hans Goudey
8be1d8cfd3 Refactor: Sculpt: Reduce scope of cloth length constraints set
Also avoid a double lookup when adding constraints.
2024-07-31 23:45:33 -04:00
Hans Goudey
8164565956 Sculpt: Data oriented refactor for cloth brush deformation
Part of #118145.
Since there are so many contiguous arrays used in the cloth brush,
this uses a different method for sharing code between the three
geometry types. For multires and BMesh, a per-node array of
vertex indices is created for the simulation calculation. Then the
results of the simulation are similarly transferred to the geometry.
2024-07-31 22:00:06 -04:00
Hans Goudey
f3b97a8fd8 Refactor: Sculpt: Skip inactive nodes in simulation loop
This should result in more even work distribution between threads.
Without this a thread might encounter just disabled nodes. Though
I'm not sure there will be real-world impacts to this change.
2024-07-31 22:00:06 -04:00
Hans Goudey
7856cb2827 Cleanup: Sculpt: Remove duplicate assignment 2024-07-31 22:00:06 -04:00
Hans Goudey
66ec57978f Refactor: Sculpt: Remove cloth distance calculation out of constraint loop
The constraint loop is single threaded, so any computation we can move
elsewhere should improve performance. This also establishes a falloff
calculation function that does more than one value at a time.
2024-07-31 22:00:06 -04:00
Sean Kim
73aeb33843 Refactor: Sculpt: Split initialization by pbvh type for boundary brush
Pull Request: https://projects.blender.org/blender/blender/pulls/125745
2024-08-01 02:57:55 +02:00
Sean Kim
653b273d2e Fix: Boundary brush bend deformation uses wrong normals
Introduced with 4b9f286af0

Pull Request: https://projects.blender.org/blender/blender/pulls/125741
2024-08-01 02:09:06 +02:00
Harley Acheson
bfa36039c2 UI: Add Periods to RNA multi-sentence descriptions
We are now wanting tooltip descriptions to not include a terminal
period unless they are multi-sentence (so internally containing a
period). #125460 removed the automatic addition of the terminal period,
but now we have to manually add them back where needed. This PR removes
the error message shown if these items end in period, and then adds one
for all RNA descriptions that are multi-sentence.

Pull Request: https://projects.blender.org/blender/blender/pulls/125507
2024-08-01 00:55:02 +02:00
Harley Acheson
7374077610 UI: Adding LTS to Title Bar and other Version Changes
This tries to keep to the spirit of task of #124511. Title bar shows
a more detailed version string, while status bar shows more compactly.
"LTS" is included in the long form when defined. Patch version shown
in both detailed and long form but only if non-zero. "Alpha", "Beta",
"Release Candidate" included in long form, but uses " a", " b", " RC"
for short form.

Pull Request: https://projects.blender.org/blender/blender/pulls/125332
2024-08-01 00:06:18 +02:00
Sean Kim
a78e56d465 Cleanup: Add const, use vector classes for helper method
Pull Request: https://projects.blender.org/blender/blender/pulls/125735
2024-07-31 23:55:29 +02:00
Sean Kim
e593198190 Refactor: Sculpt: Flatten array of structs into struct of arrays
Converts the SculptBoundary from containing an array of
SculptBoundaryEditInfo structs into holding a single struct that has
similarly sized arrays.

Pull Request: https://projects.blender.org/blender/blender/pulls/125734
2024-07-31 23:09:22 +02:00
Harley Acheson
5642944e33 UI: Screen Operations Status Bar
Status bar showing screen area operations when hovering on editor edges
and action zones. Screen area operators (move edge, split, join, etc)
showing keymaps and info during operations.

Pull Request: https://projects.blender.org/blender/blender/pulls/125467
2024-07-31 22:11:37 +02:00
Hans Goudey
fcfcdef360 Sculpt: Data oriented refactor for mask filter
Part of #118145.

This PR adds a lot of new code, but the implementations are the
same for the three geometry types, and all of the new code is
fairly straightforward. This also fixes an issue where the filter
didn't work properly for multires in main because of missing
propagation across grid boundaries.

Pull Request: https://projects.blender.org/blender/blender/pulls/125639
2024-07-31 21:16:09 +02:00
Harley Acheson
989fcc2c4f UI: Mouse Event Icon Alignment
We have a number of event icons, used on the Status Bar, to indicate
mouse actions. It is currently difficult to align these nicely because
they vary in width and design. This PR makes them all the same design
width and aligned to the left edge. This removes a need to add negative
spacing before any of them and only requires space after some of them.
This also adds a new one to indicate "double left click" as my current
use of this looks a bit sus. This also adds a "mouse wheel scroll"

Pull Request: https://projects.blender.org/blender/blender/pulls/125731
2024-07-31 20:57:19 +02:00
Hans Goudey
1d841806b5 Refactor: Sculpt: Move factor calculation out of cloth constraints loop
Part of #118145.
This loop is single threaded so the more we can remove from it the better.
The new code uses the regular original positions data rather than the
cloth sim's `init_pos` because they should be the same anyway, the
cloth sim is initialized right after undo nodes are pushed in both cases.
2024-07-31 14:36:44 -04:00
Hans Goudey
bc1c63d11a Cleanup: Sculpt: Use C++ math types for cloth collision 2024-07-31 14:36:44 -04:00
Hans Goudey
fc9da9e565 Cleanup: Sculpt: Use Vector for cloth collider cache list 2024-07-31 14:36:44 -04:00
Hans Goudey
30542df576 Refactor: Sculpt: Avoid matrix invert for every vertex in cloth brush 2024-07-31 14:36:44 -04:00
Hans Goudey
e15c839a15 Refactor: Sculpt: Remove unnecessary array initialization for cloth brush 2024-07-31 14:36:44 -04:00
Hans Goudey
c06e2ccde7 Cleanup: Sculpt: Use C++ vector types for cloth simulation 2024-07-31 14:36:44 -04:00
Hans Goudey
7bdd246352 Cleanup: Sculpt: Use C++ Map for cloth brush node state index 2024-07-31 14:36:44 -04:00
Hans Goudey
c6f8f557a6 Sculpt: Simplify/parallelize cloth brush array initialization 2024-07-31 14:36:43 -04:00
Bastien Montagne
8f70a803b5 Nodes Read/Write: Add FIXME comments about usages of 'raw data' BLO API.
`BLO_read_data_address` should basically almost never be used. However,
this code is not trivial to update, and it has an active team working on
it, so for now just tagging the issue there.
2024-07-31 19:52:12 +02:00
Bastien Montagne
f9c167c1cf Refactor: CustomData: Do properly typed read/write of CD data.
Part of on-going cleanup to remove 'invalid' usages of raw data BLO API.
2024-07-31 19:52:12 +02:00
Bastien Montagne
67d6cbe790 Refactor: Constraints: Do properly typed read of constraints data.
Part of on-going cleanup to remove 'invalid' usages of raw data BLO API.
2024-07-31 19:52:02 +02:00
Bastien Montagne
bba9de5873 Refactor: Action: Do properly typed read of IK parameters data.
Part of on-going cleanup to remove 'invalid' usages of raw data BLO API.
2024-07-31 19:29:09 +02:00
Bastien Montagne
ec07a24c10 Refactor: FCurves: Do properly typed read/write of FCurves modifiers.
Part of on-going cleanup to remove 'invalid' usages of raw data BLO API.
2024-07-31 19:28:15 +02:00
Bastien Montagne
fc5d21c888 Refactor: PointCache: Do properly typed read/write of cache data.
Part of on-going cleanup to remove 'invalid' usages of raw data BLO API.
2024-07-31 19:26:40 +02:00
Bastien Montagne
4a29395e29 Refactor: Sequencer: Do properly typed read on effectdata.
Part of on-going cleanup to remove 'invalid' usages of raw data BLO API.
2024-07-31 19:22:50 +02:00
Bastien Montagne
7a897bfdb9 BLO: Read API: Add a new function taking a DNA type name as 'type' parameter.
Somewhat mirrors similar API in the write code, allows to do properly
typed-read calls on some 'generic' types like constraints, customdata,
etc., which have a 'TypeInfo' system storing their DNA struct names.
2024-07-31 19:19:54 +02:00
Bastien Montagne
b5b13fec4c Refactor: Use non-refcounting BLO API when reading deprecated modifier data.
These reads are only done to perform some 'versioning', the data itself
is not kept in any way.
2024-07-31 19:07:13 +02:00
Bastien Montagne
df977110c5 Refactor: VSE readfile: Use 'no user' BLO API to retrieve non-owning pointers.
These type of non-owning pointers to other internal data (often used for
'active data') should not use 'refcounting' BLO API, but instead merely
retrieve the new address without marking it as used.

That address is supposed to be part of read data when processing the
actual storage, marking it as used by non-owning pointers is logically
wrong and _could_ potentially hide actual bugs in reading code.
2024-07-31 19:07:13 +02:00
Miguel Pozo
0b97228cbc Fix #125672: Mesh Analysis overlay crash
Null-check the result of `BKE_bvhtree_from_mesh_get`.

Pull Request: https://projects.blender.org/blender/blender/pulls/125725
2024-07-31 19:05:20 +02:00
Bastien Montagne
996778c50c Cleanup: Remove write code for deprecated FluidsimModifierData. 2024-07-31 18:48:40 +02:00
Bastien Montagne
c6674836d3 Cleanup: IDProps: Do not read data for 'unknown' UI data type. 2024-07-31 18:47:53 +02:00
Bastien Montagne
5f7c5e5e1e Refactor: IDProps Array read/write code.
Remove usage of `raw data` BLO API, use proper array types, explicitely
handle all supported subtypes and error on unsupported ones.
2024-07-31 18:39:45 +02:00
Bastien Montagne
6435bcbdef Refactor: Fix for proper usage of BLO API calls in some trivial cases.
All of these changes should be trivial, like using `string` read/write
code for strings, and a convert a few usages of 'raw data' read/write
calls to the 'struct' ones.

No behavioral changes expected here.
2024-07-31 18:30:50 +02:00
Bastien Montagne
a5f59782c7 Document some more our BLO API. 2024-07-31 17:16:41 +02:00
Bastien Montagne
1328e2f9d9 Fix own previous commit, sorry about that. 2024-07-31 17:16:00 +02:00
Bastien Montagne
80948f43ca Refactor: BLO: Add array size parameter to BLO_read_pointer_array.
For some reason this was the only one of these 'read array' functions
with no such parameter.
2024-07-31 16:55:29 +02:00
Bastien Montagne
bb9aba2307 Fix typo in 2372bf1377. 2024-07-31 16:30:09 +02:00
Lukas Tönne
9549c6d1ad Fix #125679: Grab tool transform mouse delta must be in layer space
Grab tool is applying mouse delta as an offset to grabbed points.
This offset was applied in world space, ignoring layer and object
transforms.

Pull Request: https://projects.blender.org/blender/blender/pulls/125695
2024-07-31 16:29:02 +02:00
Bastien Montagne
2372bf1377 Cleanup: DNA code: sanitize naming.
Previous namings in makesdna code was very confusing and inconsistent.

This commit unifies names accross the codebase as such:
- `struct` for the structs definitions data.
- `type` for the types definitions data.
- `member` for the struct members definitions data.

Structs and types definitions are not in synced for two reasons:
- types contains also definitions for basic types (int, float, etc.).
- types can be discovered before their struct definition (as members of
  other structs).

This commit also groups all members of `SDNA` struct more logically (all
'structs' ones together, then all 'types' ones, then all 'struct
members' ones).

This commit should have no behavioral change at all.

Pull Request: https://projects.blender.org/blender/blender/pulls/125605
2024-07-31 16:06:43 +02:00
Jacques Lucke
09bae67c86 Fix: Geometry Nodes: missing topology cache 2024-07-31 14:53:33 +02:00
Jacques Lucke
596cd6cd4a Refactor: Geometry Nodes: deduplicate drawing bake button 2024-07-31 13:11:19 +02:00
Jacques Lucke
de6f851a4b Refactor: Geometry Nodes: deduplicate drawing bake settings 2024-07-31 13:01:02 +02:00
Jacques Lucke
4e27ce7f42 Geometry Nodes: unify bake state string between simulations and bake nodes
Previously, they showed slightly different information (e.g. the bake node did
not show which frames would be baked).
2024-07-31 12:56:27 +02:00