Commit Graph

120055 Commits

Author SHA1 Message Date
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
Hans Goudey
7d09dce25a Merge branch 'blender-v4.3-release' 2024-10-18 16:54:55 -04:00
Hans Goudey
c98da9d971 Fix #128656: Dynamic topology undo bugs when mixing memfile undo
Caused by 889b142924
which added the early return for the BMesh case.
2024-10-18 16:47:23 -04:00
Hans Goudey
fb2085050d Merge branch 'blender-v4.3-release' 2024-10-18 16:25:45 -04:00
Hans Goudey
8bb30e2c72 Fix: Build error after recent sculpt fix
Missing from 9f3cb8b74e.
2024-10-18 15:59:36 -04:00
Sean Kim
d4237f68d5 Merge branch 'blender-v4.3-release' 2024-10-18 12:49:45 -07:00
Sean Kim
ffa4f6eaba Fix #129085: Face set from Masked operator doesnt work with Multires
When the operator was ported away from the old PBVHVertRef
implementation, the corresponding Multires mask elements were never
accessed correctly.

Pull Request: https://projects.blender.org/blender/blender/pulls/129137
2024-10-18 21:46:36 +02:00
Sean Kim
34d8535a4e Merge branch 'blender-v4.3-release' 2024-10-18 11:21:38 -07:00
Hans Goudey
9f3cb8b74e Fix: Potential nested threading issue with thread local storage
We would have to use task isolation here because of the use of
`EnumerableThreadSpecific`. Anyway, nested threading isn't
helpful because of the relatively small node sizes.

Pull Request: https://projects.blender.org/blender/blender/pulls/129222
2024-10-18 20:04:31 +02:00
Scott-Dubinsky
b785484917 Fix: Extra return in node tools data-block handling
Pull Request: https://projects.blender.org/blender/blender/pulls/128457
2024-10-18 20:03:32 +02:00
Germano Cavalcante
784739499e Merge branch 'blender-v4.3-release' 2024-10-18 14:56:12 -03:00
Germano Cavalcante
97816b3936 Fix #129161: Snap Toggle turning on after confirming with 'Set Snap Base'
A smaller enum value was passed to ENUM_OPERATORS, causing bitwise-not
issues.
2024-10-18 14:29:11 -03:00
Falk David
df3796a668 Fix: GPv3: Interpolation tool doesn't fail if no frame mapping is found
The `find_curve_mapping_from_index` function could fail if no
`interval` was returned from `find_frames_interval`, but this error
was not handled by the caller. This meant that
`InterpolateOpData::from_operator` could create empty
`InterpolationPairs` for every layer. In this case, the operator would
not do any interpolation, but it would still create a keyframe.

The operator shouldn't try to interpolate when there are no mappings
found.

The fix makes `find_curve_mapping_from_index` return `true`
when it succeeds. Then it checks if any mappings have been found
and if none were found returns `nullptr` from `InterpolateOpData::from_operator`.
The operators can then check if the `InterpolateOpData` exists
and otherwise exit.

Pull Request: https://projects.blender.org/blender/blender/pulls/129212
2024-10-18 19:24:23 +02:00
Falk David
d61c08453d Merge branch 'blender-v4.3-release' 2024-10-18 18:11:20 +02:00
Falk David
1906446716 Fix: GPv3: Newly added objects don't have the Use Lights setting set
The issue was that the code checked for the `OB_GPENCIL_LEGACY`
type instead of `OB_GREASE_PENCIL`.
2024-10-18 18:09:10 +02:00
Thomas Dinges
6a1fa73b18 Merge branch 'blender-v4.3-release' 2024-10-18 17:20:04 +02:00
Omar Emara
fdb3dc0377 Fix: Crash when changing compositor device
Blender crashes when changing the compositor execution device. That's
because cached resources that were originally computed for CPU are now
being used for GPU and vice versa, which can be unexpected in code that
uses them.

To fix this, we free and recreate the entire compositor context when the
execution device or precision change, because it is much easier and
safer to recreate everything as opposed to trying to update the
necessary resources.
2024-10-18 16:58:35 +03:00
Pratik Borhade
74129b648b Fix #129142: GPv3: gesture select tools selecting only right handles
When selection type is set/and for gesture selection tools, Instead of
current attribute, all three selection attributes (`.selection`, `left_handle`,
`right_handle`) are reset in every iteration of for loop.

Pull Request: https://projects.blender.org/blender/blender/pulls/129147
2024-10-18 15:32:53 +02:00
Bastien Montagne
ad943c1cf3 Cleanup: Remove unused forward function declaration. 2024-10-18 15:27:21 +02:00
Charles S
49bfcbc06d Fix: Replace MEM_freeN / MEM_delete mismatch in blurkernel
Discovered via an abort when using the blur brush.

Pull Request: https://projects.blender.org/blender/blender/pulls/128956
2024-10-18 15:20:32 +02:00