Commit Graph

117289 Commits

Author SHA1 Message Date
Miguel Pozo
40eaa01d8c Fix #130235: Eevee: Viewport Render Animation causes white/black flashes of materials
Disable deferred compilation for viewport image renders.

Pull Request: https://projects.blender.org/blender/blender/pulls/130335
2024-11-15 16:47:58 +01:00
Clément Foucault
1d48d8428c Refactor: Grease Pencil: Port depth merge and mask invert to new draw manager
_No response_

Pull Request: https://projects.blender.org/blender/blender/pulls/130326
2024-11-15 16:16:53 +01:00
Lukas Tönne
366c8e247a Fix #130275: Trace sequence operator only uses first frame
The operator needs to look for exact frame matches, otherwise
it simply re-uses the first frame over and over.

Pull Request: https://projects.blender.org/blender/blender/pulls/130317
2024-11-15 15:54:56 +01:00
Clément Foucault
d04d23bc40 Refactor: Grease Pencil: Port AntiAliasing drawing to new draw manager
_No response_

Pull Request: https://projects.blender.org/blender/blender/pulls/130324
2024-11-15 14:32:28 +01:00
Clément Foucault
87cf01efab Refactor: Grease Pencil: Port Vfx drawing to new draw manager
_No response_

Pull Request: https://projects.blender.org/blender/blender/pulls/130301
2024-11-15 14:04:14 +01:00
Falk David
8e75b5f4c7 Merge branch 'blender-v4.3-release' 2024-11-15 12:53:38 +01:00
Lukas Tönne
217fa8d09e Fix #130276: Trace operator needs to tag data after curves replacement
1. Trace operator was missing a topology cache tag after replacing the stroke
   data. This caused an invalid normals cache and crash in drawing code.
2. The drawings must not be manipulated outside the main thread. Job data now
   stores a curves geometry array that is used to update the drawings at the end of the job.
3. Since the job data now stores an array it has to be allocated using MEM_new.

Co-authored-by: Falk David <falk@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/130313
2024-11-15 12:52:43 +01:00
Christoph Lendenfeld
dbcc9d7820 Refactor: Keying set code
No functional changes intended.

After moving the keying set code to animrig with b38d8ecb86,
a few things needed cleaning up.

* Improving comments
* adding `const` where possible
* simplify code in some areas

Pull Request: https://projects.blender.org/blender/blender/pulls/130314
2024-11-15 12:32:22 +01:00
Aras Pranckevicius
3c4ee91926 Merge branch 'blender-v4.3-release' 2024-11-15 12:52:49 +02:00
Aras Pranckevicius
64198971ea Fix: Reading some old blend files fires assert in Sequencer data read
wdas_cloud.blend file on 4.3+ raises an assert, due to reading some
VSE data:

  readfile.cc:4798, blo_verify_data_address(), at
  'MEM_allocN_len(new_address) >= expected_size' Corrupt .blend
  file, unexpected data size.

This is caused by 30dbb7820d which removed completely unused
data from Sequence struct. But it turns out, Sequence serialization
inside scene_blend_read_data is "somewhat strange", to put it mildly,
and silently assumes that struct offset of seqbase and channels
will never change.

For now, restore the previously expected struct member offset,
ensure it stays like that via static_assert, and add notes on
how someone should fix this in a better way.

Pull Request: https://projects.blender.org/blender/blender/pulls/130296
2024-11-15 11:51:49 +01:00
Sybren A. Stüvel
b3af7e8cd6 Fix #130268: Assertion triggered when animate property from Material panel
Fix an assertion that an embedded data-block has a zero 'real user'
count. Apparently it's possible for the shader node tree (embedded by
the material) to have a user count of 1.

Since that looks valid to me (only one user, namely the material itself)
I think it's fine to extend the assertion to that.

I did keep the assertion, to ensure that the embedded data-block is not
shared by multiple users. That shouldn't be possible, in any case.

Pull Request: https://projects.blender.org/blender/blender/pulls/130281
2024-11-15 11:19:44 +01:00
Pratik Borhade
6e508c84a1 Fix: Avoid default in switch case
Discussed in !130213 to mention enum item explicitly instead
of `default`.

Pull Request: https://projects.blender.org/blender/blender/pulls/130267
2024-11-15 11:12:40 +01:00
Christoph Lendenfeld
b38d8ecb86 Refactor: move keyingsets to animrig
No functional changes intended.

This patch moves the relevant keying set code from editors to animrig.
All functions are in the animrig namespace, and as such have lost their
`ANIM_` prefix.
Other than that, the code has been moved as is into `animrig/intern/keyingsets.cc`

Note that I also had to move `id_frame_has_keyframe` and `fcurve_frame_has_keyframe`.
I moved that into `ANIM_keyframing.hh` and `ANIM_fcurve.hh` since I found that more fitting.

Due to Windows defining `DELETE` as macro I had to rename `ModifyKeyMode::DELETE`
to `ModifyKeyMode::DELETE_KEY`

As a result of this two includes from animrig to editors were removed.

This is part of #121336

Pull Request: https://projects.blender.org/blender/blender/pulls/129980
2024-11-15 10:51:41 +01:00
Hans Goudey
091c175c5c Refactor: Move region runtime to separate C++ runtime struct
This allows using C++ types in the region runtime data, which will
make it easier to move the remaining runtime data out of the
`ARegion` DNA type and improve code readability in these areas.

Pull Request: https://projects.blender.org/blender/blender/pulls/130196
2024-11-15 02:00:11 +01:00
Sean Kim
1e357cdca8 Cleanup: Change calc_*_intersect_data functions to take depth by value
Pull Request: https://projects.blender.org/blender/blender/pulls/130256
2024-11-14 23:52:30 +01:00
Clément Foucault
3c32a18fac Cleanup: EEVEE: Remove unused function with legacy API calls 2024-11-14 23:50:39 +01:00
Clément Foucault
92aa3fe46b Cleanup: Workbench: Address shader warnings 2024-11-14 23:39:01 +01:00
Clément Foucault
c0c816f846 GPU: GLSL compilation as C++ for workbench static shaders 2024-11-14 23:15:06 +01:00
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