Commit Graph

111941 Commits

Author SHA1 Message Date
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
Jacques Lucke
74d6a28bb1 Refactor: Geometry Nodes: deduplicate getting draw context for bake nodes
Simulation zones now also use `get_bake_draw_context` to get the bake context,
instead of implementing essentially the same thing again.
2024-07-31 12:47:13 +02:00
Pratik Borhade
a95adea20a Fix: Compiler error due to uninitialized variable
Came with d4ce2dfe60
2024-07-31 16:13:53 +05:30
YimingWu
ef855a8165 Fix #125681: GPv3: Inverted "Fade Inactive Layers" option
"Fade Inactive Layers" option was accidentally inverted in GPv3, now
corrected.
2024-07-31 12:12:43 +08:00
Sean Kim
7b05c2b7ed Fix: Boundary brush crash when not on boundary
Introduced with 4b9f286af0.

Pull Request: https://projects.blender.org/blender/blender/pulls/125686
2024-07-31 04:05:00 +02:00
Campbell Barton
14b03fca3c PyAPI: add bpy.app.python_args, use when calling Python from Blender
Expose arguments to use when creating a Python sub-process.

Python could fail to start when loaded in a customized environment,
with PYTHONPATH set for e.g. Blender ignores these and loads but a
Python sub-process attempts to use these environment variables which
may point to incompatible Python versions.

Resolve the root cause of #124731.
2024-07-31 11:59:23 +10:00
Harley Acheson
b64cf71c1d Fix #125554: Change to File Browser Thumbnail Type Icon Location
This PR changes the locations of the status icons shown on file item
thumbnails in the File Browser. Rather than show the file type at the
bottom-left of the thumbnail extent, show it at the item bounds. This
way they always are aligned with each other. This also changes the
current file indicator (top-right) similarly and adds an outline.

Pull Request: https://projects.blender.org/blender/blender/pulls/125625
2024-07-30 21:30:22 +02:00
Sean Kim
4b9f286af0 Refactor: Sculpt: Partial refactor of boundary brush
Part of #118145.

This PR splits the three custom deformation types (bend, slide, twist)
into separate implementations based on PBVH.

Pull Request: https://projects.blender.org/blender/blender/pulls/125640
2024-07-30 21:29:22 +02:00
Harley Acheson
8199da2c1e UI: Changes to Linux VSE Handle Mouse Cursors
Changes to the VSE strip handle mouse cursors when there are not
platform-specific versions. Trying to match the new design a bit
better, withing the the low resolution and aliased constraints of
the default mouse cursors.

Pull Request: https://projects.blender.org/blender/blender/pulls/125457
2024-07-30 20:58:43 +02:00
Laurynas Duburas
d4ce2dfe60 Overlay-Next Camera
Overlay-Next version of Camera.

Rel #102179

#109059 was used as a reference.

Pull Request: https://projects.blender.org/blender/blender/pulls/124122
2024-07-30 20:00:30 +02:00
Omar Emara
4d85c03815 Fix #125232: EEVEE writes wrong Cryptomatte meta data
EEVEE writes wrong Cryptomatte meta data layer name. The view layer name
is always prepended to the Cryptomatte layer name, which can cause the
view layer name to be duplicated or the existence of view layer name
where it shouldn't be.

Old: cryptomatte/{hash}/name: string 'ViewLayer.ViewLayer.CryptoObject'
New: cryptomatte/{hash}/name: string 'ViewLayer.CryptoObject'

Pull Request: https://projects.blender.org/blender/blender/pulls/125515
2024-07-30 18:51:20 +02:00
Laurynas Duburas
e356737451 Overlay-Next: Object Bounds
Overlay-Next version of bounds and collisions.

Rel #102179

Pull Request: https://projects.blender.org/blender/blender/pulls/124654
2024-07-30 18:17:28 +02:00
Lukas Tönne
00335fa46b Fix crash when loading GPv2 file, add back missing modifier info
Loading GPv2 files was crashing after modifiers were removed in #125102.
The modifier type info structs were still used for some internal
purposes (`struct_name`, `free_data`, `foreach_ID_link`), but the info
was not registered any more.

Since we only need a small portion of the typeinfo and because GPv2
modifiers will never change, using simple functions with switch
statements makes more sense here than bringing back fully fledged
typeinfo struct registration.

Pull Request: https://projects.blender.org/blender/blender/pulls/125663
2024-07-30 17:47:39 +02:00
Laurynas Duburas
94ea25ba09 Overlay-Next: Light
Overlay-Next version of light.

Rel #102179

#109059 was used as a reference.

Pull Request: https://projects.blender.org/blender/blender/pulls/123848
2024-07-30 17:37:42 +02:00
Alaska
be50c96c00 Fix #125643: Mismatch between Cycles EEVEE Vector Math Refract
Fixes a mismatch between Cycles and EEVEE when rendering a
Vector Math node in Refract mode with a normal vector of 0,0,0.

This mismatch first appeared after 8650068f0c which changed the
behaviour in Cycles, but not EEVEE.

Pull Request: https://projects.blender.org/blender/blender/pulls/125644
2024-07-30 17:33:39 +02:00
zhanghe9702
23ee950aa4 Fix: Build fails when WITH_DRAW_DEBUG=ON
Regression from #125099.
2024-07-30 15:59:15 +02:00
Julian Eisel
00a8690637 Fix: UI: Python info shown in quick label tooltip for operator buttons
When a button had an operator attached and was using quick label
tooltips, the quick tooltip would include the Python path after the
label. In other cases like toolshelf buttons or buttons representing RNA
properties only the label would be shown, as expected.

Was visible in the tooltips of asset shelf items.

Rather than relying on subtle and rather implicit logic, use explicit
early exiting after the label fields are handled.
2024-07-30 15:40:38 +02:00
Sybren A. Stüvel
69e8e4c023 Refactor: Anim, rename getname_anim_fcurve_bound to ..._for_slot
Rename `getname_anim_fcurve_bound` to `getname_anim_fcurve_for_slot`.

No functional changes.
2024-07-30 15:26:12 +02:00
Guillermo Venegas
95d8b9096a Fix poll functions success on Python error or no return value
Having a default True return value in poll functions makes this
functions to succeed when they encounter errors or do not return any
value.

Ref !125628
2024-07-30 21:36:47 +10:00
Sybren A. Stüvel
6e9731cb47 Anim: implement 'only show selected' filter on slotted Actions
Implement the 'Only Show Selected' filter option of the Dope Sheet for
slotted Actions.

Pull Request: https://projects.blender.org/blender/blender/pulls/125656
2024-07-30 13:07:12 +02:00
Sybren A. Stüvel
c5c5383701 Anim: add RNA path function to AnimData struct
Add an RNA path function to `AnimData`, so that
`repr(some_object.animation_data)` actually shows
`bpy.data["some_object"].animation_data`.

Previously it would only show the path of the owner ID, so
`bpy.data["some_object"]`, which is quite misleading.

Pull Request: https://projects.blender.org/blender/blender/pulls/125655
2024-07-30 13:05:48 +02:00
Sebastian Parborg
a1338312af UI: Add scroll padding for the redo panel in the VSE, action and NLA editors
Without this scroll padding, the end user could not scroll to make the collapsed redo panel not occlude data in these editors.

Pull Request: https://projects.blender.org/blender/blender/pulls/125237
2024-07-30 11:45:16 +02:00
Lukas Tönne
0cf688401b Fix #125607: Double imports due to duplicate IO paths
`paths_from_operator_properties` can return paths for both the explicit
operator `filepath` property as well as the `directory` content.
16129d6a attempted to fix this, but fails because one instance of a path
can be absolute and the other negative.

This patch makes sure to only compare absolute paths. Comparison uses
a separate list so that the final output can still mix absolute and
relative paths, but should only include each path once.

Pull Request: https://projects.blender.org/blender/blender/pulls/125608
2024-07-30 11:18:01 +02:00