Commit Graph

114971 Commits

Author SHA1 Message Date
Harley Acheson
39da29cedd Merge branch 'blender-v4.3-release' 2024-11-14 13:32:58 -08:00
Harley Acheson
d1171635ff Fix #129414: On linux, Join Use Active Window when Overlapping
On Linux we can't always determine topmost window under cursor,
therefore check for overlapping windows and, if so, only use the
active window.  This allows dragging between windows as long as
they don't overlap

Pull Request: https://projects.blender.org/blender/blender/pulls/130242
2024-11-14 22:31:36 +01:00
Hans Goudey
0684639e1b Cleanup: Grease Pencil: Remove indirect includes from headers
To avoid unnecessary header parsing during compilation.

Pull Request: https://projects.blender.org/blender/blender/pulls/130285
2024-11-14 22:07:19 +01:00
Hans Goudey
f879d23237 Cleanup: Use const for evaluated pre-modified mesh accessor
Conceptually this shouldn't be changed after it's created for the
first time.
2024-11-14 15:45:44 -05:00
Clément Foucault
ac58df78cc Cleanup: EEVEE: Use unique handle
- Move `ObjectRef` creation out of `object_sync`.
- Make unique handle only when needed inside the sync functions.

Pull Request: https://projects.blender.org/blender/blender/pulls/130294
2024-11-14 21:42:57 +01:00
Thomas Dinges
b8b3f8e723 Release: Bump 4.3 to rc 2024-11-14 18:53:05 +01:00
Falk David
19f14aa7aa Merge branch 'blender-v4.3-release' 2024-11-14 18:37:12 +01:00
Pratik Borhade
3b44f84686 Fix #130182: Unique layer name in move to layer popup box
Set unique name for `target_layer_name` to display in pop-up box when
creating a new layer. For that, `unique_layer_name()` is moved to member
function of `GreasePencil`.

Pull Request: https://projects.blender.org/blender/blender/pulls/130208
2024-11-14 18:30:50 +01:00
Charles Flèche
000416c933 USD: Add option to merge shape with parent xform during import
This new import option will allow users to chose if we merge USD prims
with their Xform parent.

Given a USD like:

```
def Xform "MyObject"
{
  def Mesh "MyObject_LOD0"
  {
  }
}
```

When the option is set to True (existing default), only the mesh will be
imported and its parent Xform transformation will be baked into the
Mesh.
```
# In blender after import

- MyObject_LOD0 (Mesh)
```

When the option is set to False, the parent Xform will always be
imported as an Empty object:

```
# In blender after import

- MyObject (Empty)
├─ MyObject_LOD0 (Mesh)
```

Co-authored-by: Odréanne Breton <odreanne.breton@ubisoft.com>
Co-authored-by: Sttevan Carnali Joga <sttevan.carnali-joga@ubisoft.com>
2024-11-14 18:28:23 +01:00
Hans Goudey
7074daed04 Geometry Nodes: Add "Limit Surface" option in subdivision surface node
Currently the node behaves differently from the modifier by default
because it lacks the option to use the limit surface. This is mainly
an oversight, since the option gives better results and better
performance.

This adds a new "Limit Surface" option. Because it's on by default,
there is also versioning to turn it off for existing files.

Resolves #112912.

Pull Request: https://projects.blender.org/blender/blender/pulls/130243
2024-11-14 18:21:00 +01:00
Hans Goudey
cb62d74658 Merge branch 'blender-v4.3-release' 2024-11-14 11:26:37 -05:00
Sergey Sharybin
f70ec20ab8 Fix: Leak of GHOST GPU contexts in Metal backend
Need to respect the ownership and lifetime of objects.

Pull Request: https://projects.blender.org/blender/blender/pulls/130282
2024-11-14 17:18:55 +01:00
Hans Goudey
75ab1c2daf Cleanup: Grease Pencil: Remove unused code and indirect include in header
- Remove now-unused runtime data from the legacy GP structs.
- Remove the `DNA_brush_types.h` include from the GP header.

Pull Request: https://projects.blender.org/blender/blender/pulls/130280
2024-11-14 16:59:55 +01:00
Hans Goudey
3a5e7ecbfe Cleanup: Warning from recent node editor drawing change
Mistakenly reverted a change from #130239.
2024-11-14 10:39:21 -05:00
Clément Foucault
db0db40efb Fix #130232: Overlay Next: Relationship Lines on Instances
Add missing conditional logic.
2024-11-14 16:11:47 +01:00
Hans Goudey
6c3ac28eb3 Nodes: Slightly improve editor drawing performance with large node trees
Avoid retrieving context data for every single node which can be
expensive when there are thousands of nodes. In the "Mouse House"
test file I observed a 13% improvement in drawing timings.

Pull Request: https://projects.blender.org/blender/blender/pulls/130239
2024-11-14 16:04:33 +01:00
Hans Goudey
a9209f10a6 Fix #130250: Modifier copy to selected crash using quick favorites
The rest of this function has null checks for the modifier because it
might not be part of the context and retrieved during invocation later.

Pull Request: https://projects.blender.org/blender/blender/pulls/130272
2024-11-14 16:04:19 +01:00
Miguel Pozo
9ad9984611 GPU: Fill uninitialized buffers with poison values
Pull Request: https://projects.blender.org/blender/blender/pulls/130240
2024-11-14 15:31:20 +01:00
Jeroen Bakker
272403a6cb Vulkan: Remove empty attachments
Some Vulkan platforms don't support framebuffers with gaps between the
color attachments. Workbench framebuffers can create gaps.
(`in_front_fb`, `main_fb` when used for wire frame drawing).

This PR implements a detection mechanism to detect gaps. It also disables
features that are not able to comply to this requirement.

Detected when working on #129062

Pull Request: https://projects.blender.org/blender/blender/pulls/130258
2024-11-14 13:55:33 +01:00
Hans Goudey
aa8d1a1290 Merge branch 'blender-v4.3-release' 2024-11-14 07:48:11 -05:00
Omar Emara
250196e60a Compositor: Implement Lens Distort for new CPU compositor
Reference #125968.
2024-11-14 14:22:50 +02:00
Omar Emara
4457f8a70d Compositor: Implement Movie Distortion for new CPU compositor
Reference #125968.
2024-11-14 14:21:57 +02:00
Lalit Shankar Chowdhury
6e49acb655 Vulkan: Show supported device extensions in system-info output
When vulkan is used the system-info.txt doesn't contain device extensions.
This PR adds device extensions to the system info.

Pull Request: https://projects.blender.org/blender/blender/pulls/128658
2024-11-14 13:15:09 +01:00
Hans Goudey
d364441220 Fix #128798: Face corner normals cache not tagged dirty in sculpt undo
Similar to the handling of this cache in `flush_update_step` (after a
brush stroke calculation), the face normals cache needs to be cleared.
Sculpt mode doesn't have granular updates implemented for face corner
normals currently.

Pull Request: https://projects.blender.org/blender/blender/pulls/130248
2024-11-14 12:49:28 +01:00
Christoph Lendenfeld
f025ff81fc Fix #129094: Sub-targets not symmetrized if from different armature
When symmetrizing a bone (in edit mode) any constraint subtargets were name flipped,
if possible and they exist. This only worked if the target is the armature of the bone
being flipped.
This patch changes that so a subtarget flip is always attempted for targets that are an armature.

Pull Request: https://projects.blender.org/blender/blender/pulls/129169
2024-11-14 12:04:58 +01:00
Julian Eisel
c70e93bd5c Fix: Assert when activating brush asset from the current file
Brush assets from the current file should be supported like other brush
assets.

This assert would fail on startup for example, when opening the
essentials file containing the default brush of this mode.
2024-11-14 11:45:54 +01:00
Bastien Montagne
4a372dfd2f Merge branch 'blender-v4.3-release' 2024-11-14 11:36:17 +01:00
Bastien Montagne
c107eb5c00 Fix #130260: Add support for linked editable ID filepaths to IMAGE_OT_file_browse.
Similar issues to previous problems in `IMAGE_OT_open` and the
`BKE_image` API... Relative filepaths of linked editable IDs must be
relative to the ID's library blendfile, not the current 'local'
blendfile.
2024-11-14 11:32:45 +01:00
Iliya Katueshenock
65abb1ef93 BLI: improve Map iteration API to avoid common issues at compile time
Doing something like `for (auto key : get_map().keys())` does not work, because the lifetime
of the `Map` returned by `get_map()` is not automatically extended for the duration of
the loop. This could cause crashes at run-time.

Now this pattern will not compile anymore. Note that there are possible valid use-cases
of this iterating over a `Map` that won't compile anymore either. This is fairly uncommon
though, and just storing the map in a separate temporary variable is a simple fix.
This would have been a valid usage for example: `do_something(get_map().keys())`.

This would have prevented e.g. 9840dd233c.

Pull Request: https://projects.blender.org/blender/blender/pulls/129880
2024-11-14 10:54:50 +01:00
Aras Pranckevicius
527e33cef6 Fix #60947: ffmpeg video colors shifted/banded in some players
Videos written out of blender were not explicitly indicating the color
metadata (color range, primaries, TRC, color space). While some video
players assume BT.709, some others assume BT.601, leading to inconsistent
look.

Explicitly indicate BT.709 and limited ("mpeg") YUV range for video
codecs that are YUV based (i.e. final image is non-RGB(A)). Overall now
the code does the same as these command line ffmpeg parameters:
`-vf scale=out_color_matrix=bt709 -color_primaries 1 -color_trc 1 -colorspace 1`.

This also fixes an issue where video proxies were looking wrong within
Blender, if the source video file contained colorspace metadata.

Images in PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/130021
2024-11-14 09:04:35 +01:00
Sean Kim
6b7ba4c726 Refactor: Sculpt: Avoid storing extra undo data on geometry_push
Currently, Sculpt Mode's UndoStep stores two main categories of data,
the first category is valid for undo pushes where individual nodes of a
mesh are modified, the second category is when the entire mesh is
changed.

To avoid extra processing of data and move towards reducing and
simplifying the amount of data each of these types of undo operations
need, this commit strips down the data stored when a geometry_push step
is called.

Additionally, there are some areas in the code which called
`BKE_sculpt_update_object_for_edit` as a requirement for the undo step
data, these calls have been removed.

---

Testing:
* Undo / Redo on mesh with color attributes and performing remesh operations
* Undo / Redo with shape key data
* Undo / Redo with trim tools
  * Base Mesh
  * Deform Modifier

Pull Request: https://projects.blender.org/blender/blender/pulls/129828
2024-11-14 02:07:38 +01:00
Clément Foucault
9396c8f388 Workbench: Replace usage of legacy GLSL libraries by new ones 2024-11-13 21:36:11 +01:00
Jacques Lucke
c6e7cdbc57 Merge branch 'blender-v4.3-release' 2024-11-13 18:01:04 +01:00
Luna Rood
8f200d96b2 Fix: Nodes: group edit button unintentionally drawn on NodeCustomGroup
Fix regression caused by 6d8d21812b.

Pull Request: https://projects.blender.org/blender/blender/pulls/130204
2024-11-13 17:59:16 +01:00
Clément Foucault
73a4291ff9 Merge branch 'blender-v4.3-release' 2024-11-13 17:27:27 +01:00
Clément Foucault
87c990ca30 GPU: Add more explicit message for Mac + Nvidia platform
This fixes the confusion, as the previous message
could let to believe you could make the GPU to work
by upgrading to newer MacOS version.

Rel #130224

Pull Request: https://projects.blender.org/blender/blender/pulls/130231
2024-11-13 17:25:38 +01:00
Julian Eisel
b1c86f26c9 Merge branch 'blender-v4.3-release' 2024-11-13 17:01:09 +01:00
Julian Eisel
209dc899ea Fix #128649: Tool icon in toolbar shrinked down with non HiDPI screens
Pixelsize and DPI scaling had to be applied correctly.
2024-11-13 17:00:18 +01:00
Bastien Montagne
2d6fdb8d01 Merge branch 'blender-v4.3-release' 2024-11-13 16:33:58 +01:00
Bastien Montagne
a090ae3318 Fix #125787: Textures don't load for brushes when using "Use Relative Paths" option.
Use new `_in_lib` BKE_image API to re-use or load an image from/in the
expected library, including using the library path as root path for
relative file paths handling.

Using the new `BKE_image..._in_lib` API also allows to get rid of the
`check_exists` 'hack' introduced in `image_open_exec` (when support to
edit some linked data was added, in 5f9f3116db) to avoid re-using local
Image IDs for editable linked data (brush assets), since
`BKE_image_load_exists_in_lib` will now ensure to only re-use an Image
ID if it matches the target library.

This commit also simplifies/makes `ED_image_filesel_detect_sequences`
signature more to the point. It replaces the `Main` parameter by a mere
`root_path` string. The given `bmain` was indeed only used to extract
(again) a base for relative paths.

NOTE: The general idea of this fix is the same as in PR !130058, thanks
to Sean Kim for the investigation and initial fix.

Pull Request: https://projects.blender.org/blender/blender/pulls/130197
2024-11-13 16:32:33 +01:00
Jonas Holzman
527a08ac42 macOS: Add support for clang-tidy checks during compilation
This commit adds support for clang-tidy checks during compilation on
macOS, which can now be enabled using the optional `WITH_CLANG_TIDY`
CMake variable.

The clang-tidy executable doesn't need to be separately installed since
CMake will pick up the executable from the LLVM pre-compiled library.
This commit also expands the coverage of clang-tidy checks to
Objective-C/C++, for which checks were enabled in PR #128334.

Pull Request: https://projects.blender.org/blender/blender/pulls/129761
2024-11-13 16:14:01 +01:00
Pratik Borhade
0ec011e78b Fix: Sculpt invert mask crash with multires
Similar to b1bcdf8d53.

Pull Request: https://projects.blender.org/blender/blender/pulls/130212
2024-11-13 16:00:35 +01:00
Julian Eisel
365f58ca0c Merge branch 'blender-v4.3-release' 2024-11-13 15:59:22 +01:00
Julian Eisel
671f08df96 Fix #129267: No brush previews show up with large asset libraries
Previously, we had to fetch all asset previews at once. However the preview
caching system was limited at 8192 previews, so with large asset libraries, many
previews would get dropped. Instead, allow selectively requesting previews and
only request previews of items displayed on screen. This should fix the issue,
and reduce the time it takes to display brush assets in general, especially with
bigger libraries. This should also reduce memory usage quite a lot when
displaying the asset shelf, since not all asset previews are loaded anymore.

Pull Request: https://projects.blender.org/blender/blender/pulls/130105
2024-11-13 15:53:52 +01:00
Bastien Montagne
1a32a2c66f Merge branch 'blender-v4.3-release' 2024-11-13 15:34:26 +01:00
Bastien Montagne
b863369ae9 Refactor: BKE_image: Allow to load or find existing also in a Library.
This commit refactors `BKE_image_load` and `BKE_image_load_exists` APIs:
* Remove the `_ex` versions (the 'exist' boolean return pointer can have
  default `nullptr` value instead).
* Add `_in_lib` versions, which match signature and behavior of the
  generic ID creation code to allow to find or create a new image ID
  directly in a library 'namespace' (as linked data).

This is required by upcommig fixes for Brush Assets, which are using
linked but editable data-blocks.

Fix #130194: When trying to add a new image from the UI (e.g. for a new
texture) for a local ID, if that same exact image was already loaded by
a linked ID, it would trigger an assert in `BKE_id_move_to_same_lib`,
because `BKE_image_load_exists` would return the matching linked Image ID
instead of creating a new local one. In release builds with no assert,
it would result in making a linked ID 'local', while still being used by
original other linked data.

Passing around the intended final destination of the new Image (local or
in a given library) allows `BKE_image_load_exists` to be more specific
when searching for an already loaded matching image ID, and ensures that
a new local Image ID is created in the case described above.

Pull Request: https://projects.blender.org/blender/blender/pulls/130195
2024-11-13 15:29:29 +01:00
Omar Emara
b9acba177e Compositor: Implement zero boundary EWA sampling
Reference #125968.
2024-11-13 16:01:47 +02:00
Omar Emara
e080668202 Compositor: Implement Crop node for new CPU compositor
Reference #125968.
2024-11-13 15:59:29 +02:00
Omar Emara
5fd9bbb70c Compositor: Implement Flip node for new CPU compositor
Reference #125968.
2024-11-13 15:58:38 +02:00
Leon Schittek
cff7130fc2 Nodes: Remove wrong tweak handling for reroutes
Remove `node_under_mouse_tweak` and replace it with
`node_under_mouse_select`.

The special handling for tweaking reroutes wasn't working correctly:
1. It didn't check at the correct reroute node location.
2. The (de-)selection behavior negated possible benefits anyway.

In practice the user-facing behavior is not affected by this.

Pull Request: https://projects.blender.org/blender/blender/pulls/130222
2024-11-13 14:51:08 +01:00