Commit Graph

114274 Commits

Author SHA1 Message Date
Campbell Barton
0ae9ae736e Merge branch 'blender-v4.3-release' 2024-10-22 15:58:37 +11:00
Campbell Barton
f69fbb41c1 Fix #129225: Crash in modifiers & constraints with invalid enum values
Even though this is generally avoided, drivers don't prevent
invalid values being set. Further files from branches or files
written in the future may contain enum values not yet known.

Resolve by range checking enum values which are used to index arrays.
2024-10-22 15:56:58 +11:00
Campbell Barton
07880dd369 Merge branch 'blender-v4.3-release' 2024-10-22 13:20:24 +11:00
Campbell Barton
414b9fb96f Merge branch 'blender-v4.3-release' 2024-10-22 13:20:20 +11:00
Campbell Barton
1d6add574d Fix #129167: Operator search can hang for some operator names
RNA label & description truncation could cause invalid UTF8
which caused BLI_string_search to hang.

Resolve by ensuring truncation of RNA descriptions & labels never
truncates a multi-byte sequences.

The issue with BLI_string_search would still be good to resolve but can
be handled separately.
2024-10-22 12:47:39 +11:00
Campbell Barton
40b5a4da2b Fix misleading assertion message setting built-in operator values 2024-10-22 12:46:39 +11:00
Clément Foucault
c81745e4af Fix: Overlay: Shader test broken on Mac
The merge got wrong.
2024-10-21 22:17:55 +02:00
Jesse Yurkovich
79d468fe6b Cleanup: Use compile-time format string type for OBJ and PLY writing
The `fmtlib` text formatting library, when compiled in C++20 onwards,
requires that the incoming format string is a compile-time constant so
it's able to perform type checks against it[1]. The change here ensures
it can do so.

While we're not set to go to C++20 any time soon, this is a backwards
compatible change that can be done today and allows us to focus on the
harder fmt-related issues later.

No change in performance or functionality was observed.

[1] https://godbolt.org/z/qG5dsf7YG

Pull Request: https://projects.blender.org/blender/blender/pulls/129272
2024-10-21 21:20:43 +02:00
Clément Foucault
db56bcdbe9 Merge branch 'blender-v4.3-release'
# Conflicts:
#	source/blender/draw/engines/overlay/overlay_next_curve.hh
#	source/blender/draw/engines/overlay/shaders/infos/overlay_edit_mode_info.hh
2024-10-21 19:19:35 +02:00
Clément Foucault
4a83a58c82 Fix: DRW: Make submit without manager sync still valid
Fixes assert triggering during EEVEE render test.
2024-10-21 19:16:55 +02:00
YimingWu
5fff95f519 Fix: Grease Pencil: Add back support for stroke direction overlay
Since GPv3 shader currently uses particle strand/points shader, we
need to modify that slightly to display the grease pencil overlays.

This adds the missing `vflag` attribute to the edit gpencil batch.

Co-authored-by: Clément Foucault <foucault.clem@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/128116
2024-10-21 18:47:24 +02:00
Clément Foucault
3035fd1c36 GPencil: Port geometry shader to primitive expansion API
This removes the need for the geometry shader and the
workaround path for Metal.

Note that creating 2 batches for each stroke might become
a bottleneck in bigger scenes. But currently the bottleneck
is always be the fill algorithm. It can be optimized further
if needed.

Rel #127493

Pull Request: https://projects.blender.org/blender/blender/pulls/129274
2024-10-21 16:25:24 +02:00
Jacques Lucke
8588e196c4 Merge branch 'blender-v4.3-release' 2024-10-21 15:48:06 +02:00
Jacques Lucke
7c7b8e1f28 Fix #129087: don't show empty panels in geometry nodes modifier
If a panel is detected to be empty, it is hidden automatically now.
This is the same behavior as in group nodes.
2024-10-21 15:47:16 +02:00
Jacques Lucke
b5eb379e81 Merge branch 'blender-v4.3-release' 2024-10-21 15:34:27 +02:00
Jacques Lucke
84ffe3720d Fix #129217: crash when switching geometry nodes to tool mode with active viewer
The viewer does not work without a context and the context is derived from `snode.id`.
2024-10-21 15:33:21 +02:00
Jason Fielder
4408628a94 Fix: Metal: Resource leak when closing before all compilation batches have finished.
Addresses the case when Blender is shutdown before the
parallel compiler has finished processing all the shader batches.
The parallel compiler destructor will now attempt to terminate all
of the outstanding batches and free the shaders.

Authored by Apple: James McCarthy

Pull Request: https://projects.blender.org/blender/blender/pulls/129172
2024-10-21 14:58:50 +02:00
Aras Pranckevicius
7567c07480 Merge remote-tracking branch 'origin/blender-v4.3-release' 2024-10-21 15:45:12 +03:00
Aras Pranckevicius
28ea1d2f7b Fix: VSE scopes crash on float images
Regression since a904db3ee7 ("skip no-op colorspace transforms for
float images"), the newly added do_display_buffer_apply_no_processor
function did not handle case of both source and destination being
float images. This happens when VSE produces a float image, and
you turn on a Waveform scope.

Pull Request: https://projects.blender.org/blender/blender/pulls/129293
2024-10-21 14:43:56 +02:00
Omar Emara
8b8ab301a4 Cleanup: Clarify Cryptomatte layer identification 2024-10-21 15:32:19 +03:00
Jacques Lucke
d7368e0068 Cleanup: remove unused variable 2024-10-21 14:29:04 +02:00
Arye Ramaty
b686e72e57 Fix: wrong offset in the 'Has Neighbour' output of the 'Index of Nearest' node
The first encounter wasn't counted for, which resulted in a bias of one
(vertices with single neighbor return false), I initialized the counting from
1 instead of zero which seems to solve the problem.

Pull Request: https://projects.blender.org/blender/blender/pulls/129021
2024-10-21 14:21:41 +02:00
Jacques Lucke
e67d7355f2 Merge branch 'blender-v4.3-release' 2024-10-21 14:19:58 +02:00
Jacques Lucke
21a24cf82b Fix #129263: improve measured node execution times
Measure the times of nodes and zones more explicitly in more cases instead
of relying on adding up smaller measurements.
2024-10-21 14:13:28 +02:00
Falk David
3075bd3f2c Merge branch 'blender-v4.3-release' 2024-10-21 14:12:40 +02:00
Falk David
83e562aad4 Fix #129247: GPv3: Removing material doesn't remap some materials correctly
The issue was that the code that remaps the materials for when
a slot is removed was returning when the `material_index` attribute
didn't exist instead of continuing the loop over all drawings.

This issue was present both in `BKE_grease_pencil_material_remap`
and `BKE_grease_pencil_material_index_remove`
but `BKE_grease_pencil_material_remap` forced the `material_index`
attribute to be created, which meant that the early return
was never hit.

The fix fixes both issues:
* Continue instead of return.
* Don't create the `material_index` attribute in `BKE_grease_pencil_material_remap`
  if it doesn't exist.

Pull Request: https://projects.blender.org/blender/blender/pulls/129288
2024-10-21 14:11:11 +02:00
Falk David
b05e9f7bd6 Fix #127523: Missing update when updating positions with Python
The issue was that the strokes were not using the `POLY` type and
needed to be tagged.

This adds a function `tag_positions_changed` on the `GreasePencilDrawing`
so that the high-level python API can tag the positions if
the `point.position` attibute is written to.

Pull Request: https://projects.blender.org/blender/blender/pulls/129292
2024-10-21 14:10:32 +02:00
Alaska
d92ee66889 Fix #128905: Clarify EEVEE volumetric shadows tool tip
Make the tool tip for the volumetric shadow option in EEVEE
easier to understand.

Pull Request: https://projects.blender.org/blender/blender/pulls/128918
2024-10-21 14:08:24 +02:00
Clément Foucault
46c452dfc3 GPU: Remove shader builder
There is no need for this complexity anymore
as we now have the shader unit tests.

Pull Request: https://projects.blender.org/blender/blender/pulls/129014
2024-10-21 14:00:12 +02:00
Clément Foucault
20d09435ab DRW: Add split visibility and command generation function
This adds the possibility to the user code to
group visibility and command generation compute
dispatch together to reduce the overhead of
PSO and pipeline switch.

This PR also make passes that have been submitted
(i.e.: that generated commands) as read-only.

This allows to automatically remove redundant
command generation when submitting the same
pass with the same view multiple times, or,
remove redundant visibility calculation for the
same view in multiple passes. This automation
is done for the common usage of the API (using `submit`).

Custom usage (using `submit_only`) needs to abide by
the rule of the API and update visibility and commands
when required.

Pull Request: https://projects.blender.org/blender/blender/pulls/129170
2024-10-21 13:32:54 +02:00
Jacques Lucke
cc202bbe1c Merge branch 'blender-v4.3-release' 2024-10-21 13:24:07 +02:00
Jacques Lucke
f729d98fa4 Fix #129269: can't load images packed into the .blend file
The issue only happened when compiling with clang which
apparently evaluated the parameters in a different order.

`IMB_steal_encoded_buffer` sets `ibuf->encoded_size` to 0.
2024-10-21 13:13:58 +02:00
Campbell Barton
64027cd178 Merge branch 'blender-v4.3-release' 2024-10-21 22:00:40 +11:00
Campbell Barton
c836c0a20e Fix #129151: Crash showing tool-tips from dynamic enums
Duplicate descriptions for dynamic enum menu items to resolve
use-after-free error.
based on !129008.

Ref !129164

Co-authored-by: Julian Eisel <julian@blender.org>
2024-10-21 21:59:13 +11:00
Omar Emara
141e48258a Fix: Memory leak when canceling compositor
Blender leaks memory when the compositor gets canceled. That's because
later operations in the compositor are responsible for freeing the
results of earlier operations, so when the compositor gets canceled
before all operations got the chance to execute, memory will be leaked.
To fix this, force free all operations when the compositor gets
canceled.
2024-10-21 13:46:26 +03:00
Campbell Barton
cbe6a3eb23 Merge branch 'blender-v4.3-release' 2024-10-21 21:41:16 +11:00
Lukas Tönne
41655fcb3d Fix #129255: Color modifier uses wrong material slot index
This worked in simple cases because the material slot index gets clamped
so negative slot indices become slot 0.

Pull Request: https://projects.blender.org/blender/blender/pulls/129287
2024-10-21 12:26:57 +02:00
Campbell Barton
f60f2b769b Unbreak building with Python 3.12
Support for 3.13 [0] broke 3.12.

[0]: d9f38fca5f
2024-10-21 20:47:07 +11:00
Dalai Felinto
9b1c51165c Merge remote-tracking branch 'origin/blender-v4.3-release' 2024-10-21 11:46:19 +02:00
Pratik Borhade
5ffab634d8 Fix: GPv3: Missing active vertex paint tool settings in side panel
Wrong context string for gpv3 vertex paint mode.
`.greasepencil_vertex` is being used in `GreasePencilVertexPanel`

Pull Request: https://projects.blender.org/blender/blender/pulls/129285
2024-10-21 11:21:16 +02:00
Bastien Montagne
7937a7eadf Fix #129207: GPv3: Linked GPv2 objects disappear when reopening file.
This happens because blender 4.3 only knows about GPv3 IDs, and
therefore stores a reference to a directly linked GPv2 obdata as a GPv3
one, which cannot be found again on next file load in the GPv2 library.

The idea of this fix is, if the looup of a idcode+idname fails, to also
search for the same name but with an older, deprecated ID code.

Pull Request: https://projects.blender.org/blender/blender/pulls/129220
2024-10-21 11:13:25 +02:00
Omar Emara
acc2772c45 Merge branch 'blender-v4.3-release' 2024-10-21 11:49:41 +03:00
Omar Emara
bce20b935c Fix #129205: Crash when Cryptomatte picking while rendering
Blender crashes when picking Cryptomatte while rendering. This is
because pass data are not yet allocated. To fix this, we just fail the
picking until data becomes available.
2024-10-21 11:47:30 +03:00
Jacques Lucke
58c660c961 Fix: Functions: simple exeution preset for multi-functions 2024-10-20 15:48:20 +02:00
Pratik Borhade
e923f98b50 Merge branch 'blender-v4.3-release' 2024-10-20 15:57:58 +05:30
Pratik Borhade
33518d3039 Fix: GPv3: Drop operation crash when drag type is not node
Crash is poll function when drag type is other than layer/group For
example: dragging some element from outliner to layer list.
Also removed redudant check when returning from function.

Pull Request: https://projects.blender.org/blender/blender/pulls/129246
2024-10-20 12:21:07 +02:00
Aras Pranckevicius
b0052aa821 ffmpeg: Support H.265 video output codec
Now can pick "H.265 / HEVC" in the video codec dropdown.

Implementation notes:
- Remap CRF value (which is for H.264) slightly to better match H.265
  CRF range (e.g. default Medium 23 -> 28).
- Set lossless mode via appropriate private param, and use 4:4:4 YUV
  format just like for some other video codecs when in lossless.
- Currently there are no built-in presets for H.265. Maybe later, especially
  if/when we'll add 10 bit or HDR videos.

Pull Request: https://projects.blender.org/blender/blender/pulls/129119
2024-10-20 10:27:33 +02:00
Campbell Barton
ba77368455 Cleanup: disambiguate variable naming relating to selection
- Both "hit_resullt" & "hitresult" were used in the same functions
  with different meanings. Rename `hitresult` to `select_id`,
  a convention already widely used.

- Armature selection shadowed "result", using it to store two kinds
  of selection results, use "hit_result" for GPUSelectResult.
2024-10-19 10:16:27 +11:00
Sean Kim
8da0cfa000 Merge branch 'blender-v4.3-release' 2024-10-18 16:15:22 -07:00
Sean Kim
15be5b7708 Fix #129204: Multires normal automasking broken for certain brushes
Introduced in a4c9c01f31

Pull Request: https://projects.blender.org/blender/blender/pulls/129236
2024-10-19 01:14:00 +02:00