Commit Graph

110177 Commits

Author SHA1 Message Date
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
Bastien Montagne
f59f5fd83f Fix #122901: Geonodes modifier- setting an imput as string crashes blender.
Regressions (typo) from 57669600b1.
2024-06-08 16:26:28 +02:00
Campbell Barton
3412a34145 Merge branch 'blender-v4.2-release' 2024-06-08 23:34:46 +10:00
Campbell Barton
5f06d3aa17 Extensions: consider system repositories read-only
The following operations have been removed for system repositories:

- Installing from disk.
- Uninstall extensions.
- Delete files (when removing the repository).

Also change the operator to remove a repository so the option to
remove files is now a boolean instead of an enum. While a dynamic
enum can be made to work, this option is logically a boolean.
2024-06-08 23:04:17 +10:00
Campbell Barton
c0c1f1884a Merge branch 'blender-v4.2-release' 2024-06-08 13:46:38 +10:00
Campbell Barton
4718d68349 Extensions: expose extensions debug option in release builds
These are useful for more verbose output and expose useful utilities
for development.
2024-06-08 13:32:24 +10:00
Clément Foucault
3f247d6a3c Fix: GPU: Make tests compile 2024-06-08 00:25:40 +02:00
Germano Cavalcante
cf73d80deb Merge branch 'blender-v4.2-release' 2024-06-07 17:59:51 -03:00
Germano Cavalcante
4690c69a65 Fix #122787: Grid snap in UV Editor also snaps to vertices
The `Snap to Grid` and `Snap to Vertex` modes were being mixed if
either mode was enabled.

Support for mixed snap modes doesn't yet fully work for UVs.
2024-06-07 17:58:45 -03:00
Jesse Yurkovich
77baa064ce Merge branch 'blender-v4.2-release' 2024-06-07 13:29:15 -07:00
Jesse Yurkovich
e24eb7d85c Fix #122820: Collection export would dirty the file
The various collection export operators had their flags set for undo.
This isn't necessary and would cause the .blend file to be marked dirty.

Pull Request: https://projects.blender.org/blender/blender/pulls/122864
2024-06-07 22:28:07 +02:00
Germano Cavalcante
6bf9d6f038 Merge remote-tracking branch 'origin/blender-v4.2-release' 2024-06-07 16:45:33 -03:00
Germano Cavalcante
2cb8b4b7f7 Fix #122438: Orbit Around Selection drastically moves view
When starting a navigation operation that uses `Auto Depth` or
`Orbit Around Selection` the value of `#RegionView3D::dist` is modified
to match the distance from the new pivot.

This value was incorrect when the pivot was behind the viewer.

In these cases `dist` is negative.

This commit, in addition to fixing `dist`, also limits the execution of
this code to only when `Auto Depth` is used.

Pull Request: https://projects.blender.org/blender/blender/pulls/122795
2024-06-07 21:41:50 +02:00
Hans Goudey
a6d00905f0 Cleanup: Sculpt: Simplify retrieval of multires draw buffers layout
Pull Request: https://projects.blender.org/blender/blender/pulls/122899
2024-06-07 21:35:21 +02:00
Hans Goudey
5013ab90f6 Cleanup: Sculpt: Rename PBVH draw multires variable
Everything here is drawn as triangles in the end, and currently we use
index buffers either way, so "needs_tri_index" isn't a meaningful name.
What this really controls is whether the layout is flattened to duplicate
each subdiv vertex 4 times, for drawing flat shading.
2024-06-07 21:35:19 +02:00
Hans Goudey
8df0690ab4 Sculpt: Optimize mesh wireframe index buffer creation
Retrieve the index buffer data as a span and set it directly rather than
using the API functions to add vertices which add overhead. Also pass
all the necessary data as arguments instead of retrieving them from
the "args" struct on every use.

In a test with a 16 million vertex grid, this reduces the runtime of
generating all the wireframe index buffers by about 25%, from 95 to 76 ms
for that step of the drawing process.
2024-06-07 21:35:19 +02:00
Hans Goudey
0d9d6fad41 Cleanup: Sculpt: Remove unnecessary draw debugging code 2024-06-07 21:35:19 +02:00
Hans Goudey
a9907c4ed9 Sculpt: Fix over-allocation of wireframe index buffers
The lines index buffers were twice as big as they needed to be.
The init function already multiplies by the number of indices in
the primitive type.
2024-06-07 21:35:19 +02:00
Hans Goudey
39894f4beb Sculpt: Avoid double map lookup creating draw batches 2024-06-07 21:35:19 +02:00
Hans Goudey
279fda3dcd Cleanup: Sculpt: Reorder function to avoid forward declaration 2024-06-07 21:35:19 +02:00
Hans Goudey
c18d209b85 Refactor: Sculpt: Move some drawing code out of classes
Most functions in `draw_pbvh.cc` are inside of the `PBVHBatch` or
`PBVHBatches` classes, besides the more recently added attribute
copying code. This means they have access to "all the information"
and it's hard to get a sense for the proper order of calculation and
what each function is responsible for. This commit is an attempt to
clarify things a bit by changing to regular static functions.
2024-06-07 21:35:19 +02:00
Hans Goudey
dc0fe8a26c Cleanup: Sculpt: Remove unnecessary variables from draw batches
lines_count was set but never used. tris_count was the same in one
case and just set to the same value as faces_count in another.
2024-06-07 21:35:19 +02:00
Hans Goudey
fd992c57bf Cleanup: Sculpt: Avoid unnecessary clearing of index buffers 2024-06-07 21:35:19 +02:00
Hans Goudey
8cac7bc6cc Cleanup: Sculpt: Use CCG grid index access utility in drawing code 2024-06-07 13:39:12 -04:00
Hans Goudey
9f4930509e Cleanup: Sculpt: Rename multires draw iteration variables
These "j" and "k" are actually X and Y, it's a bit easier to understand
what's going on if they're named that way.
2024-06-07 13:39:12 -04:00
Hans Goudey
466df1a97a Subdiv: Utility for grid index XY lookup, use in paint visibility function 2024-06-07 13:39:11 -04:00
Miguel Pozo
2276d0e767 Merge branch 'blender-v4.2-release' 2024-06-07 19:01:47 +02:00
Miguel Pozo
35cfc71b95 EEVEE: Parallel specialization constants compilation
Convert `Renderbuffers::sync` into `RenderBuffers::init`.
Use `GPU_shaders_precompile_specializations` in EEVEE.

Pull Request: https://projects.blender.org/blender/blender/pulls/122798
2024-06-07 18:53:59 +02:00