Commit Graph

110204 Commits

Author SHA1 Message Date
Hans Goudey
108c94f736 Cleanup: Reduce indentation, use const variables 2024-06-10 13:49:17 -04:00
Julian Eisel
8c8dcf8aaf Cleanup: Add comment to render job flag
Wasn't exactly clear what this was doing before, and the logic using it
requires a bit of brain gymnastics to follow (with negations, nested
if's and continue's).
2024-06-10 19:09:50 +02:00
Brecht Van Lommel
b67ffb9b76 Merge branch 'blender-v4.2-release' 2024-06-10 17:26:18 +02:00
Brecht Van Lommel
6cccbc8df9 Fix #82483: Random Cycles baking hangs with node editor open
CTX_data_ensure_evaluated_depsgraph should not be used in drawing code.
This triggered a depsgraph updated which in turn called
DRW_notify_view_update. This would bind the GPU context a second time
and hang due to recursive mutex calls.
2024-06-10 17:24:49 +02:00
Ray Molenkamp
d49dc4c104 Merge remote-tracking branch 'origin/blender-v4.2-release' 2024-06-10 09:18:06 -06:00
Ray Molenkamp
28f7a467fa cmake: windows: only install fftw's dlls when available
These are no longer used in 4.2 and need not to be installed.
2024-06-10 09:17:11 -06:00
Julian Eisel
1abb633698 Merge branch 'blender-v4.2-release' 2024-06-10 16:56:37 +02:00
Julian Eisel
83edd748a2 Fix #120466: Crash when opening file with inactive asset browser
Issue wasn't directly related to material assets or the shader editor.

Simpler steps to reproduce:
- Open Asset Browser
- Change Asset Browser to different editor type
- Open new file (Ctrl+N)

The asset browser would remain in storage as inactive editor, including
pointers to the asset system. When opening a new file, the asset system
would get freed before the asset browser, which would then access
dangling pointers as part of its own freeing process.

Part of the issue is that `SpaceType.exit()` doesn't get called in this
case, which would remove the asset system references before the asset
system is freed. Will address this in a follow up in main, but best to
not depend on the `exit()` callback too much. Easy to do here.
2024-06-10 16:54:03 +02:00
Sybren A. Stüvel
69e520627f Anim: reset idroot when adding a layer or binding to an Action
Legacy Actions can become a layered Action, simply by removing all the
legacy FCurves and adding a layer or binding. This means that
`Action::idroot` can be non-zero, while it should be zero for layered
Actions. This is now enforced in `Action::layer_add()` and
`Action::binding_add()`.

Pull Request: https://projects.blender.org/blender/blender/pulls/123004
2024-06-10 15:57:47 +02:00
Sybren A. Stüvel
3c01ff0824 Anim: Bump subversion to 1 for 'generated' keytype theme versioning
Bump the sub-version to get 3089ac97b1
applied properly to 4.3-alpha user prefs files as well.
2024-06-10 15:54:01 +02:00
Sybren A. Stüvel
e566dc3c3c Merge remote-tracking branch 'origin/blender-v4.2-release'
This is just a merge, a version bump is still necessary. Will do that in
a subsequent commit.
2024-06-10 15:51:28 +02:00
Miguel Pozo
4b3b4a9d8b Merge branch 'blender-v4.2-release' 2024-06-10 15:28:32 +02:00
Sybren A. Stüvel
3089ac97b1 Anim: add new keytype 'generated' styling to the Sequencer theme
Add the color for the new keytype 'generated' to the VSE theme settings
as well.

This includes the versioning code that loads the default from the scene.
Without this, the preference would be initialised to black.

Note that the 'Blender Light' theme does not have any colors for any of
the key types, so I also didn't add the 'generated' type there.

Pull Request: https://projects.blender.org/blender/blender/pulls/123005
2024-06-10 15:28:05 +02:00
Miguel Pozo
1ed2779abc Fix #122973: Subprocesses aren't closed if Blender crashes
Assigns all subprocesses to a job owned by the main Blender instance,
so they're closed when it ends.

Pull Request: https://projects.blender.org/blender/blender/pulls/123001
2024-06-10 15:27:14 +02:00
Hans Goudey
729bfe7800 Cleanup: Rename more paint variables
Avoid the one letter variable names and rename "tar" to "dst".
2024-06-10 09:04:35 -04:00
Sybren A. Stüvel
3f0114730d Anim: UI: Action selector now always lists layered Actions
The Action selector (in the Action editor) now lists all layered
Actions. Legacy Actions are limited to specific ID types (via their
`idroot` property), whereas layered Actions are not (it's their Bindings
that are limited in this way, not the Actions themselves).

Pull Request: https://projects.blender.org/blender/blender/pulls/123003
2024-06-10 15:02:18 +02:00
Hans Goudey
daefd4f838 Cleanup: Rename paint/brush variables
Avoid one/two letter variable names.
2024-06-10 08:50:05 -04:00
Bastien Montagne
11462dd5c3 Merge branch 'blender-v4.2-release' 2024-06-10 14:46:44 +02:00
Bastien Montagne
17332da834 Fix (unreported) path_resolve returns string instead of bytes for bytes idprops.
The following code in py console would return a python string object,
instead of the expected bytes one.

```python
value = b"Hello World"
key = "a"
C.object[key] = value
C.object[key]
>>> b"Hello World"
C.object.path_resolve('["%s"]' % key)
>>> "Hello World"
```

Now it will return a byte object as it should.

Found while investigating #122843 .
2024-06-10 14:27:04 +02:00
Campbell Barton
8749a9c917 Merge branch 'blender-v4.2-release' 2024-06-10 22:23:24 +10:00
Campbell Barton
554b3c5bd9 Extensions: support custom-directory for system repositories
While this is reasonably obscure, not supporting this caused the UI
to be confusing and there is no strong reason not to support this.
2024-06-10 22:22:07 +10:00
Lukas Tönne
ddd079b54f Fix #122756: Crash when node outputs an empty GVolumeGrid
`GVolumeGrid` and `VolumeGrid<T>` are basically pointer wrappers.
Assigning a nullptr is possible and allowed by code, but node socket
code doesn't currently check if a grid pointer is null before accessing
it.

Disallow null grid pointers in socket values. Asserts are added for this
purpose. The Points-to-SDF node checks the grid value before writing to
output.

Pull Request: https://projects.blender.org/blender/blender/pulls/122996
2024-06-10 13:55:15 +02:00
Campbell Barton
3bd5baa3fd Merge branch 'blender-v4.2-release' 2024-06-10 21:31:12 +10:00
Damien Picard
de139dd7e4 UI: Fix and improve a few messages
- "Show the result of running commands in the main interface...": add
  punctuation.
- "Re-Installed" -> "Reinstalled" seems more common.
- "increase_" and "decrease_subdivision" in the Grease Pencil
  modal...: use title case instead of snake case for label.
- "Use a automatic number..." -> "an", typo.
- "... points,{} splines": missing space.
- "End Frame is larger than Start Frame": wrong order in error message.
- "Approximate the object as sphere, which diameter is equal to
  thickness the defined...": grammar.
- "Show Seconds" -> "Use Timecode": this option is not necessarily about
  seconds. Suggested by Pablo Vasquez.
- Brightness and contrast node input descriptions: add missing spaces.
- "Gamma controls the relative intensity... full white.": remove
  trailing ".".

Pull Request: https://projects.blender.org/blender/blender/pulls/122972
2024-06-10 13:26:05 +02:00
Sergey Sharybin
6334fdc988 Merge branch 'blender-v4.2-release' 2024-06-10 11:46:48 +02:00
Sergey Sharybin
a2795852cd Fix ##122962: Regression: Backdrop update triggers crash
Pull Request: https://projects.blender.org/blender/blender/pulls/122991
2024-06-10 11:45:01 +02:00
Nathan Vegdahl
119f764eb9 Fix: Child Of constraint broken after removing target
Fixes #116567

The issue was with a flag that skips a particular post-evaluation step
specially for the Child Of constraint.  The flag wasn't getting properly
unset when the constraint target was removed, and therefore that
post-evaluation step was getting erroneously skipped in some cases.

This commit fixes the issue by always setting the flag appropriately in
the Child Of evaluation function itself.  This is admittedly rather
hacky, but no more hacky than the existence of the flag in the first
place.

Pull Request: https://projects.blender.org/blender/blender/pulls/122881
2024-06-10 10:32:40 +02:00
Aras Pranckevicius
36a13294e8 Merge branch 'blender-v4.2-release' 2024-06-10 11:18:24 +03:00
John Swenson
44641ac5c7 Fix: VSE snapping when both strip handles selected
This patch makes sure that when both left/right handles on a strip are
selected, they are given individal snap points in TransSeqSnapData.

Prior to this change, when both handles were selected, snapping only
worked on the left handle.

Pull Request: https://projects.blender.org/blender/blender/pulls/122931
2024-06-10 11:17:48 +03:00
John Swenson
b469dc04f9 Fix: VSE snap to hold offset is broken
Snapping to hold offsets was broken by 76043bc, this patch restores the
functionality by simply calculating the image data start/end points and
letting existing clamping code take over to make sure this snap target
does not exist outside of the bounds of the strip.

Pull Request: https://projects.blender.org/blender/blender/pulls/122934
2024-06-10 10:15:15 +02:00
Jeroen Bakker
f13e51543c Cleanup: Fix spelling mistake
Attachement -> Attachment

Pull Request: https://projects.blender.org/blender/blender/pulls/122988
2024-06-10 09:57:15 +02:00
Jacques Lucke
7010306626 Cleanup: use stored toposort index in cycle detection 2024-06-10 09:54:42 +02:00
Campbell Barton
3e59ddb6ef Merge branch 'blender-v4.2-release' 2024-06-10 17:04:14 +10:00
Campbell Barton
c3d04a765c Merge branch 'blender-v4.2-release' 2024-06-10 17:04:11 +10:00
Nathan Burnham
c6ec2993b3 PyAPI Doc: vert_pair described as single vert
`BMVert.copy_from_vert_interp()`'s description and the name `vert_pair`
implies two verts, but the argument itself was described and typed as a
single `BMVert`.

Ref: !122974
2024-06-10 16:59:52 +10:00
Jeroen Bakker
1361034c4d EEVEE-Next: Change read-write access lightprobe world
Light volume probe world shader doesn't read from the irradiance atlas
but its create info registered it as a read/write texture. This
raised a validation error on Metal/Intel as the combination
RGBA16F FLOAT3D read write isn't supported.

Pull Request: https://projects.blender.org/blender/blender/pulls/122646
2024-06-10 08:36:35 +02:00
Hans Goudey
f371f46a50 Fix: Crash extracting vertex buffer for incomplete set of Mesh UV maps
The ranges in the vertex buffer were indexed incorrectly when
some of the UV maps weren't uploaded.
2024-06-09 11:22:09 -04:00
Campbell Barton
2007fc2029 Merge branch 'blender-v4.2-release' 2024-06-10 00:25:32 +10:00
Campbell Barton
b4ea8583ed WM: correct logic for resetting add-ons & caching meta-data
All add-ons were being scanned at startup, while this didn't cause
errors it was noticeable with extensions where any errors in the
manifest were being reported at startup, even when running with
factory-startup (including blender's own tests).

Address two issues:

- The logic to "reset" add-ons, so as to match the preferences when
  reverting or resetting preferences always ran on startup.
  This occurred because a check for Python being initialized was
  incorrectly used to detect that this wasn't the first time preferences
  were being loaded (regression in [0]).

- Resetting add-ons scanned all add-ons (including disabled add-ons) to
  ensure their module cache is up to date. Since this the cache is
  lazily initialized, it's simpler to set it as uninitialized as
  resetting the add-ons doesn't require the cached meta-data.

[0]: 497bc4d199
2024-06-10 00:22:56 +10:00
Campbell Barton
231a56a272 Merge branch 'blender-v4.2-release' 2024-06-09 11:35:43 +10:00
Campbell Barton
db6703d976 Cleanup: remove unused variable 2024-06-09 11:35:07 +10:00
Campbell Barton
2f392ff0cc Cleanup: quiet switch warning 2024-06-09 11:21:53 +10:00
Harley Acheson
8937c0bcab UI: IDSearch Image Thumbnail Tooltips
Hover tooltips for the Data-block ID selector showing previews for
images, movies, and fonts and also showing extra details.

Pull Request: https://projects.blender.org/blender/blender/pulls/118945
2024-06-08 22:41:58 +02:00
Germano Cavalcante
79244e5632 Merge branch 'blender-v4.2-release' 2024-06-08 16:11:18 -03:00
Germano Cavalcante
965a138671 Fix #121025: Edge Slide not picking the correct reference edge
The occlusion test was considering the local position of the vertices
as being in world space.

The solution is to convert to world space first.
2024-06-08 16:07:29 -03:00
Germano Cavalcante
efd3c4b3c9 Fix #122896: Knife snap to edge fails when a vertex is behind the viewer
Although c9fa73a379 made the problem worse. The incorrect to snap to
edges when one of their vertices is behind the viewer is much older.

The problem occurred because, in perspective mode, when we project a
vertex with negative "zfac", its projected value is undefined as it
depends on the position of the other vertex.

Thus, both the distance test and the lambda in these cases were wrong.

The solution was to calculate the snap point directly in 3D, using
`closest_ray_to_segment_v3` and avoiding projecting the edge.
2024-06-08 12:09:25 -03:00
Germano Cavalcante
85f026f478 Cleanup: Move closest_ray_to_segment_v3 logic from snapping code to BLI 2024-06-08 12:09:24 -03:00
Clément Foucault
fb7d5e49d3 Fix: EEVEE-Next: Shadow: Very low resolution shadow in viewport
This was caused by the base page tagging.

Since that the base page is now required for fixing
soft shadows, it would be the first level to be rendered
which, combined with the update throttle, lead to only
the min LOD to be available when the shadow was updated
in viewport.

This was affecting the jittered shadows, animation update
and viewport transform.

The fix is to only request the base page after throttling
the updates and only if there is no other LODs to be
rendered. This mean jittered shadow in viewport might
become affected by the missing base page artifacts, but
this is less noticeable than huge light leaking.
only if
2024-06-08 16:58:52 +02:00
Bastien Montagne
d19d23e91f Cleanup: IDProperty: Add an enum type to idprops flags. 2024-06-08 16:51:20 +02:00
Bastien Montagne
cf3323fe32 Merge branch 'blender-v4.2-release' 2024-06-08 16:29:50 +02:00