Commit Graph

136732 Commits

Author SHA1 Message Date
Jaume Bellet 026abd0020 Merge branch 'bf-blender' into mb-0009-addon-menu-references
2024-06-03 22:36:12 +02:00
Jaume Bellet b46366ec1f Merge branch 'main' of into bf-blender 2024-05-29 19:15:23 +02:00
Clément Foucault ec36412c45 Overlay: Make Facing overlay not rely on render engine depth
This add depth writting to avoid missing pixels that haven't
been rendered by the render engine. But this forces to
not use the blending mode (otherwise we would have
order dependent results). Removing blending breaks selection
outlines so we have to move the rendering of the facing
overlay before the outline overlay. This doesn't fix the
situation for in-front objects but it improves the current
behavior for non-in-front objects.

Fix #121662
2024-05-29 17:54:42 +02:00
Clément Foucault fabdeff9ca Fix: EEVEE-Next: Wrong variable in versioning code
Caused by 32259aa0b6
2024-05-29 17:54:42 +02:00
Brecht Van Lommel 5d213d78e3 Fix #122362: Shadow linking with volumes and transparency misses light
We can't do the optimization to shorten the ray when we might still need
to go through transparent surfaces or volumes to reach the light.

This issue was not light tree specific, however in the test file it was
more noticable because the light tree poorly handles some areas. This in
in turn causes MIS weights for forward path tracing to become higher,
which is where the error was.

Pull Request:
2024-05-29 17:53:32 +02:00
Bastien Montagne b32d026441 Fix (studio-reported) unlinkable IDs made directly linked during blendfile write.
Regression from 435b6743fd, no usage of unlinkable ID (mainly
shapekeys...) should make them directly linked.

Note that this had no serious consequences, it was mainly printing annoying
error messages in release builds, and asserting in debug ones.
2024-05-29 17:38:08 +02:00
Harley Acheson 50bf1f3a52 Fix #122395: Fix Icon Errors Building Headless
Add defines to allow building headless, otherwise we
get undefined symbol errors for UI_icon_from_event_type

Pull Request:
2024-05-29 17:32:28 +02:00
Hans Goudey 628e34fdfb Cleanup: Use C++ types for sculpt boundary brush data 2024-05-29 11:04:33 -04:00
Jacques Lucke 7be4d4f443 Nodes: automatically move viewer node to current node
This improves working with viewer nodes in geometry and compositor nodes.
Previously, the viewer node would typically stay at the position where it was first
inserted which leads to very long links in many cases. Now the viewer node
automatically moves to the place where the user ctrl+shift+clicked to view data.

The viewer is placed slightly to the right and top of the current node. It is moved
up a bit, so that it does not get in the way as quickly when the user wants to add
another new node. Furthermore, the viewer node position is chosen so that it
does not intersect with other nodes.

In the future we could implement animating the node position so that it slowly
transitions to it's new places.

Pull Request:
2024-05-29 16:49:33 +02:00
Hans Goudey 96415bc42a Sculpt: Specialize a few vertex neighbor iteration cases for BMesh
The start of a transition to remove this API more generally.
2024-05-29 10:41:41 -04:00
Clément Foucault 32259aa0b6 Fix: EEVEE-Next: Versioning older file to remove indirect volume light
Make sure older file have indirect volume lighting disabled to
avoid this new feature washing out the volume object lighting.
2024-05-29 16:19:32 +02:00
Clément Foucault 4ab652256d Fix: EEVEE-Next: Invisible volume without any shader attributes
By removing the check we make it possible to render volume objects
even if the shader doesn't require any volume attribute.

We still check if there is any attribute to not draw empty
volume objects that have no attribute as a unit cube.

Fix #103683
2024-05-29 16:17:53 +02:00
Clément Foucault 204f56e59d EEVEE-Next: Add jittering in fast GI bitmask angle
This avoids banding artifacts caused by the finite bitmask
using for Fast GI / Ambient Occlusion.

Fix #116032
2024-05-29 16:01:58 +02:00
Philipp Oeser 40e036b63e Fix #122344: PLY exports non-normalized custom normals on scaled objects
On export, PLY creates a matrix (in `set_world_axes_transform`) -- the
inverse transpose of the regular matrix [seems like the usual way of
transforming normals]] --  by which the normals are multiplied. This can end
up in non-normalized custom normals on scaled objects though. Corrected
in this PR by just normalizing after said multiplication.

On import, `BKE_mesh_set_custom_normals_from_verts` is used with the raw
data -- which ends up in `mesh_normals_corner_custom_set` which in turn
"is expected to have normalized normals" (from the comment).
We _could_ also make sure to normalize on import, however, setting these
properly on export seems the primary choice.
Other importers also dont go the extra route of making sure to normalize
the incoming data, so this seems to be in line of what other Im-/Exports

Pull Request:
2024-05-29 15:39:24 +02:00
Hans Goudey 98eecfcff0 Cleanup: Sculpt: Use C++ Vector for vertex neighbors 2024-05-29 08:58:10 -04:00
Jacques Lucke 05820ae1cc Cleanup: remove unnecessary assert
It doesn't make sense to check if an unsigned integer is >= 0.
2024-05-29 14:55:14 +02:00
Jacques Lucke 59ae253664 Fix: remove test for removed method
The method was removed in bea8825446.
2024-05-29 14:54:31 +02:00
Iliya Katueshenock bea8825446 Cleanup: BLI: Remove Span::get method
Unlike to `lookup_or_default` accessor methods of `Map` or attribute provider class,
`Span::get` is not so explicit and self described to be used with default value.
Other one issue was is that result is by value. But this is not the main reason to
delete this method. And although this can be fixed by reference, this is still not
such good to just have method to check index and return something.

Pull Request:
2024-05-29 14:26:21 +02:00
Pratik Borhade c7635fa200 GPv3: Assert on translating keys
Caused by f011d8f508.
`ale->update` should be 0 after animdata update. Otherwise it would
cause the assert (it also ensures all update cases are handled for keys).

Resolves #122259

Pull Request:
2024-05-29 14:24:37 +02:00
Iliya Katueshenock 022620b490 Fix: Missing space in tooltip
Fix of change from e6ccff1044

Pull Request:
2024-05-29 14:05:54 +02:00
Campbell Barton 515d8b9a0d Cleanup: minor tweaks to comments for extensions notifications 2024-05-29 21:33:24 +10:00
Campbell Barton 33622c7546 Fix extensions makefile on systems without a GNU userland 2024-05-29 21:28:40 +10:00
Pratik Borhade 781f9b9886 GPv3: Extrude operator in points menu
Similar to gpv2, move this operator inside points menu.
Also, this is an operator executed on selected "points".

Pull Request:
2024-05-29 13:10:13 +02:00
Campbell Barton e991154ddb Extensions: sync remote extensions when displaying preferences
When online mode is enabled and the preferences are shown,
the users needed to manually check for updates.

Now this runs in the background, sharing logic with checking for
updates on startup.

When updates run status text is currently shown in the preferences
window, eventually this should be displayed in the status bar.

To avoid conflicts when updating a queue is used to avoid problems
caused by check for updates on startup & the preferences window also
checking for updates. Since checking for updates is optional it's
possible some repositories wont be handled by checking on startup
so both updates run for now. De-duplicating update checks can be
supported eventually.
2024-05-29 21:04:55 +10:00
Falk David bf676e8973 GPv3: Draw Tool: Replace "Input Samples" with "Spacing"
The GPv2 draw tool used a setting called "Input Samples" to
generate points (subdivisions) when two samples are far apart
from one another.

In GPv3 we have the same feature, but with a bit more control.
Users can now specifiy the maximum distance between two
points based on a percentage of the brush size (in pixels).
2024-05-29 11:55:59 +02:00
Falk David 6e76b9f6b3 Fix: GPv3: Issues in `find_or_create_layer_in_dst_by_name`
There were some issues in this function.
* Undefined behavior for the fallback when getting the `layer_src`
* Searching for the layer `grease_pencil_dst` based on the value of a pointer, instead of the `name`.

Pull Request:
2024-05-29 11:25:15 +02:00
Clément Foucault 91fee3eca8 Cleanup: EEVEE-Next: Rename lightprobe files
Use new naming convention

Pull Request:
2024-05-29 11:19:50 +02:00
Campbell Barton 051e10d39a Extensions: make "test_blender" less noisy 2024-05-29 15:31:44 +10:00
Campbell Barton 3f5f5eb2c0 Fix invalid URL's causing extension operations to fail to run
URL's without a known prefix now use error reporting that shows up in
the status bar.
2024-05-29 15:26:30 +10:00
Campbell Barton f0ebc310c8 Extensions: update tests after changing UI text 2024-05-29 15:11:55 +10:00
Brecht Van Lommel 5de8ea74c4 Extensions: Only check for updates on startup every 24 hours
To reduce network bandwith and to only bother users once a day with
add-on updates. All repos are checked together so that there is only
one notification per day.

Also tweaked the wording so that it's more clear this will not actually
install the updates.

Ref !121888
2024-05-29 15:07:04 +10:00
Raul Fernandez 8182ebd4d2 Fix #95419: Sculpt: Invert visible hides all faces with Multires modifier
Fix for sculpt mode: invert visible hides all faces with Multires modifier #95419

Grids face indices should not change on the fly based on hidden state.
It caused the rendering glitches shown on the original bug report and the attached recordings.

* this PR removes the unnecessary check and dependency of grids visibility with the smooth/sharp of faces.
* replaces smooth flag for sharp flag which better express the intent and simplifies the logic.

Pull Request:
2024-05-29 06:02:54 +02:00
noodlebox fa4e26f1ee Fix: Node assets are missing from the Add menu for certain catalog names
Add > Utilities submenus for Color and Field do not include assets from the
correctly named catalogs due to typos: "Utilties/Color" and "Utilties/Field"

Pull Request:
2024-05-29 05:44:47 +02:00
Campbell Barton ddb00ad5e4 License headers: add SPDX header 2024-05-29 12:49:07 +10:00
Campbell Barton c5a27f011e Cleanup: spelling in comments 2024-05-29 12:49:07 +10:00
Campbell Barton e3a6eed5c5 Cleanup: correct function name spelling 2024-05-29 12:49:07 +10:00
Nathan Burnham f0603d8fac PyAPI Doc: improve BMesh typing
- `BMLayerItem.copy_from(other)` had a typo in its docstring that prevented `other` being typed.
- `BMesh.from_object()` and `BMesh.from_mesh()` had untyped arguments.
- `BMVert.copy_from_vert_interp()`'s `fac` argument was untyped.
- `remove(item)` method of `BMVertSeq`, `BMEdgeSeq` and `BMFaceSeq` had no type for `item`.
- `get()` method of `BMEdgeSeq` and `BMFaceSeq` had "sequence" in the description of `verts` but not in the type.

Pull Request:
2024-05-29 03:00:03 +02:00
Damien Picard 4b4ae72837 Import Images as Planes: improve option panels
- Layout changes
  - Use panels instead of boxes resulting in a more compact UI,
    more suitable to the drag-and-drop UI.
  - Make all enum options to drop-down menus.
  - Rename the title of `Position` box to `Transform`.
  - Remove sub-headers `Plane dimensions`,
    `Orientation` under Transform box.
  - Move offset related options to the bottom. Importing a single
    plane would be more common use case.
- Rename "Animate Image Sequences" to "Detect Image Sequences".
- Rename several labels and option names. Since drop-down allows more
  space, make some option names verbose.
- Remove the warning `'Opaque' does not support alpha`. It should be
  obvious from usual Blender usage, and doesn't need a special warning
  from the add-on.
- Disable Alpha Mode options instead of hiding it when use alpha is
- Hide Track Camera option instead of disabling it when supported
  align modes are selected.
- Fix or rewrite several tool-tips.

Original PR by Sun Kim: blender/blender-addons!104936

Ref: !122345

Co-authored-by: Sun Kim <>
2024-05-29 10:02:52 +10:00
Campbell Barton 7dc5b7c134 Fix error upgrading/installing extensions for the active repository
Removing the check for an empty repository list isn't correct when
only polling the active repository. Restore the check with a more
detailed error message.
2024-05-29 09:48:14 +10:00
Campbell Barton 6360edc867 Cleanup: quiet unused argument warning, line wrapping 2024-05-29 09:48:14 +10:00
Harley Acheson 707503bf73 Fix #122403: Show correct Hex values for managed colors
Adjusted calculation of hex values so that what is shown matches what
is displayed for material colors as well as for theme colors.

Pull Request:
2024-05-29 01:13:50 +02:00
Hans Goudey 434b225bb8 Cleanup: Sculpt: Reduce usage of topology array references
Access topology arrays directly from the mesh as needed instead.
Part of #118145.

Pull Request:
2024-05-28 23:48:39 +02:00
Hans Goudey 61fa2b7991 Paint: Reduce constant work for each node in weight paint
Move the loop over all affected nodes to each brush implementation,
making use of lambdas to avoid a bunch of boilerplate code. This makes
it clearer what logic actually depends on the vertices in each node, and
decreases future overhead if we decide to make PBVH nodes smaller.
2024-05-28 23:48:37 +02:00
Hans Goudey aae77d5e60 Cleanup: Paint: Use const arguments 2024-05-28 23:48:37 +02:00
Hans Goudey 808c29d8db Cleanup: Paint: Remove more permanent storage of topology map
Access the vertex to face map directly from the mesh as necessary.
This helps to prevent unnecessary calculation (it isn't necessary in
weight paint mode besides the blur brush anymore), though it is
used for vertex normals calculation for smooth-shaded meshes.
2024-05-28 23:48:37 +02:00
Hans Goudey f31d3b9e39 Paint: Remove use of vert to corner topology map
This saves 4 bytes per face corner and 4 bytes per vertex.
2024-05-28 23:48:37 +02:00
Hans Goudey 5cd06ffe60 Cleanup: Mesh: Modernize vert to corner topology map naming 2024-05-28 23:48:37 +02:00
Hans Goudey bdb949bc76 Cleanup: Paint: Retrieve vert positions from consistent array
`ss.vert_positions` and `pbvh.vert_positions` are expected to point to the
same evaluated deformed position array here. It's preferrable to use the
span we already have locally. Though eventually we hope to remove the
vertex position array from PBVH.
2024-05-28 23:48:37 +02:00
Hans Goudey 144c995c06 Paint: Remove PBVH vertex iteration macro from weight & vertex paint
Part of #118145.
2024-05-28 23:48:37 +02:00
Hans Goudey 73a407061a Paint: Read selection before brush falloff
Reading the selection is much cheaper than calculating the brush radius
since it just requires reading from a boolean array. Better to do it earlier
so the radius calculation can be skipped for deselected points.
2024-05-28 23:48:37 +02:00