Commit Graph

122551 Commits

Author SHA1 Message Date
Laurynas Duburas
38c1656624 Fix #143635: Grease Pencil: Use only editable points in use_connected_only
In function `curve_populate_trans_data_structs` only editable points are
copied to `TransDataContainer`.
The code handling proportional connected editing was expecting all data
from `CurvesGeometry` to be there. Additional offset index array was
added for editable points per curves.

Pull Request: https://projects.blender.org/blender/blender/pulls/144655
2025-08-25 11:03:37 +02:00
Habib Gahbiche
68abaa12d5 Fix: List Style still shown in Nodes
The Theme Space List was removed in 19c15e0218 but accidently
reintroduced again when adding the compositor asset shelf in
0a0dd4ca37, most likely while solving merge conflicts.

Pull Request: https://projects.blender.org/blender/blender/pulls/145098
2025-08-25 10:23:32 +02:00
Jeroen Bakker
98b4c3e252 Cleanup: Remove obsolete comment 2025-08-25 09:23:32 +02:00
Campbell Barton
904794e330 Fix #144970: Crash selecting the text on a linked duplicated text object
Restrict EditFont manipulation to the object which is in edit-mode
previously multiple threads could clear & assign EditFont::selboxes
at once which crashed when in edit-mode with linked duplicates.
2025-08-25 06:40:55 +00:00
Campbell Barton
98fd1a942c Refactor: move run-time flags from CharInfo::flag to CharTrans
The Curve, Curve::strinfo & EditFont::textbufinfo are now read-only
during evaluation. CharTrans is now used to store some evaluation
options such as wrap/overflow/smallcaps.

Since it's no longer possible to inspect evaluation flags from operators
without evaluating the curve, line beginning/end functionality has been
moved from the operator into vfont_to_curve.
2025-08-25 06:40:53 +00:00
Campbell Barton
e17677ce73 Refactor: move font-curve initialization & validation out of evaluation
Ensure arrays are valid when reading instead of evaluation.
In general correcting data in evaluation is error prone since
data may be accessed from other parts of Blender before evaluation
(Python scripts for example), and isn't thread-safe in edit-mode
where the edit-data is shared, see #144970.

This also removes material index correction, this doesn't cause
problems as the evaluated `Nurb` must already support out of range
material indices.
2025-08-25 06:20:11 +00:00
Campbell Barton
dae9bed968 Refactor: move the evaluated font size into EditFont
Avoids manipulating the Curve when evaluating fonts.
2025-08-25 06:20:10 +00:00
Campbell Barton
88129ffa6b Cleanup: pass a curve to BKE_vfont_select_* instead of an object
Let callers use a curve without depending on the object.
2025-08-25 06:20:08 +00:00
Campbell Barton
352575d620 Cleanup: remove unused Curve::lines & disabled RNA definition 2025-08-25 06:20:07 +00:00
Piotr Makal
7e4defbf3b Fix: Performance regression when using bevel and subdivision modifier
PR https://projects.blender.org/blender/blender/pulls/144233.
Fix #142296 performance regression caused by merging UV positions
based on face area weights, replacing it with mean average weights
computation. The former method resulted in higher probability in making
subdivision cache invalid between frame updates and thus causing expensive
recreation of blender::bke::subdiv::OpenSubdiv_Evaluator object.
While this fix isn't directly answering a question why specific UV position
updates would cause this reevaluation of subdivision object, it fixes
the performance regression caused by #139595 PR.
2025-08-24 08:59:47 -04:00
Campbell Barton
1b559b4f78 Cleanup: quiet class-memaccess warning 2025-08-24 19:50:40 +10:00
Brecht Van Lommel
adeacf9644 Fix: ACES 2.0 studio config sets image files to ACES2065-1 incorrectly
This config has a single file rule with default set to ACES2065-1. Just ignore
the default rule now, which some other applications seem to be doing as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/145054
2025-08-24 10:49:33 +02:00
Campbell Barton
ac88bc0e76 Doc: add clarifications to fix for #144958 2025-08-24 16:33:29 +10:00
Campbell Barton
85d5ade00f Cleanup: spelling in comments (make check_spelling_*) 2025-08-24 06:26:08 +00:00
Campbell Barton
a080a2f4d0 Cleanup: use doxygen comments for BKE_subdiv* 2025-08-24 16:19:48 +10:00
Richard Antalik
1e2476f362 Fix #144982: Crash when scrubbing retimed strips
Caused by casting float value to int in source cache eviction logic. The cache
key was changed from int to float for timeline frame, but this was not changed
in `source_image_cache_evict()`. Compiler did not catch this unfortunately.

Pull Request: https://projects.blender.org/blender/blender/pulls/145019
2025-08-23 23:10:59 +02:00
Jacques Lucke
1ea6c4396c Refactor: Spreadsheet: make value drawing function more reusable
The goal is to make it easier to support columns where values have different
types. This is achieved by extracting a drawing function that draws whatever is
in a `GPointer`.

Pull Request: https://projects.blender.org/blender/blender/pulls/145046
2025-08-23 20:27:49 +02:00
Harley Acheson
a06dde9471 Fix #145000: Draw Buttons Even When Editor Very Narrow
Don't skip button drawing when the editor is narrower than it is.

Pull Request: https://projects.blender.org/blender/blender/pulls/145030
2025-08-23 17:34:20 +02:00
Jesse Yurkovich
bd6c4d73a0 Fix: Crash during USD import of an instanced point-instancer
Found while trying to import an instanced point-instancer with the
operator setting `support_scene_instancing=false`.

The point-instancer Prototype would be partially processed but not
completely since the option was disabled. This caused a discrepancy
during the final portion of import where the view layer was synced and
we attempted to query for an object that was not present.

Pull Request: https://projects.blender.org/blender/blender/pulls/144845
2025-08-22 22:22:47 +02:00
Sean Kim
ae26bc82b0 Fix: Unified Paint Settings changes do not notify the scene
Currently, when some values on the UnifiedPaintSettings struct are
changed, the corresponding active brush gets notified that something has
been edited, but not the scene, despite the data being stored on a scene
basis.

Pull Request: https://projects.blender.org/blender/blender/pulls/144951
2025-08-22 22:16:32 +02:00
Harley Acheson
0b6255a292 Cleanup: UNUSED_VARS referencing unknown variable
Function argument was removed but now we have an UNUSED_VARS that
references it when running without WITH_OPENSUBDIV.
2025-08-22 11:19:28 -07:00
Philipp Oeser
7acdef1bd1 Fix #129241: AssetBrowser "display mode" Reset Default sets wrong mode
The Asset Browser (as opposed to other Filebrowser) is restricted to
either FILE_HORIZONTALDISPLAY / FILE_IMGDISPLAY, as noted in https://
projects.blender.org/blender/blender/issues/103563#issuecomment-82835
the UI isnt polished enough for FILE_VERTICALDISPLAY it seems. However,
resetting to default would leave us with exactly that.

To resolve, control the default dynamically via an
`RNA_def_property_enum_default_func` (and set it to FILE_IMGDISPLAY for
the Asset Browser).

Pull Request: https://projects.blender.org/blender/blender/pulls/144917
2025-08-22 20:04:06 +02:00
Brecht Van Lommel
33c722481b Color Management: Make per-view look filtering work with AgX HDR
Consider the part of the view name before the dash to be the prefix that
we expect the look to have. So that both "AgX" and "AgX - HDR" match
looks starting with "AgX -".

Pull Request; https://projects.blender.org/blender/blender/pulls/142758
2025-08-22 19:21:17 +02:00
Sergey Sharybin
628f53a28c Refactor: Consolidate baking settings into BakeData
Almost all settings were duplicated between BakeData and RenderData.
The only missing field was the bake type, which is stored as a custom
property in Cycles.

This change:
- Removes unused bake_samples and bake_biasdist.
- Migrates settings like bake_margin to BakeData.
- Switches multires baker to use bake_margin.
- Introduces bake type in the BakeData, the same way how it was
  defined in RenderData::bake_mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/144984
2025-08-22 19:18:03 +02:00
Sergey Sharybin
8348438cae Multires bake: Rework baking high-res displacement
This change makes it so baking displacement to the high-resolution mesh
(Use Low Resolution Mesh option is OFF, displacement is calculated
between top multi-resolution level and subdivided viewport level mesh)
uses texture UVs and tangent space from the high-res mesh.

This matches intended use-case when object baked with such configuration
have subdivision surface applied to them bringing overall resolution to
the same level as the highest multi-resolution level.

The issue was simple to see when baking high-res displacement for an
object which uses "Keep Corners, Junctions" UV smoothing.

The unfortunate aspect is increased memory usage due to calculation of
the grid index and grid UV mapping, but it is not too bad (12 bytes per
loop, so is like 48Mb per million face). Feels like there is a way to
optimize it by utilizing knowledge that high-res mesh faces are created
in a specific order, but also feels it is not that important at this
moment.

Pull Request: https://projects.blender.org/blender/blender/pulls/144935
2025-08-22 18:24:57 +02:00
Sergey Sharybin
e0154de320 Rework Bake from Multires
The main idea is to switch Bake from Multires from legacy DerivedMesh
to Subdiv. On the development side of things this change removes a lot
of code, also making it easier easier to rework CustomData and related
topics, without being pulled down by the DerivedMesh.

On the user level switch to Subdiv means:

- Much more closer handling of the multi-resolution data: the derived
  mesh code was close, but not exactly the same when it comes to the
  final look of mesh.

  Other than less obvious cases (like old DerivedMesh approach doing
  recursive subdivision instead of pushing subdivided vertices on the
  limit surface) there are more obvious ones like difference in edge
  creases, and non-supported vertex creases by the DerivedMesh.

- UV interpolation is done correctly now when baking to non-base level
  (baking to multi-resolution level >= 1).

  Previously in this case the old derived mesh interpolation was used
  to interpolate face-varying data, which gives different results from
  the OpenSubdiv interpolation.

- Ngon faces are properly supported now.

A possible remaining issue is the fact that getting normal from CCG
always uses smooth interpolation. Based on the code it always has been
the case, so while it is something to look into it might be considered
a separate topic to dig into.
2025-08-22 17:59:27 +02:00
Sergey Sharybin
a56922099e ImBuf: Change rounding for byte buffer in IMB_rectfill()
It matches the behavior of IMB_rectfill_area() with opaque alpha now.

This is important as the function is used in baking, where the neutral
0.5 is expected to be mapped to 128.
2025-08-22 17:17:35 +02:00
Sergey Sharybin
c9a87558d4 Refactor: Mass Mesh as const to multires displacement
The only annoying part is that for the external MDISPS the mesh
needs to be cast to non-const.

Arguably it is semantically correct behavior as the details of
how external data is read is kind of implementation details.
2025-08-22 17:15:06 +02:00
Sergey Sharybin
0c3136de84 Refactor: Use float2 in the multires baker
Shortens some formulas, and reduces the number of arguments.
Also reduce the variables scope.

No functional changes expected.
2025-08-22 17:15:06 +02:00
Sergey Sharybin
1e4764a9a5 Refactor: Simplify subdiv utilities
- Return evaluated points as function return value.
  Used in cases when only limit or final point is requested, without
  partial derivatives.

- Re-order function argument list and use default argument values to
  simplify usage in the simple/typical cases.

No functional changes expected.
2025-08-22 17:15:06 +02:00
Jeroen Bakker
e24e58f293 Vulkan: Recycle descriptor pools
This PR adds recycling of descriptor pools. Currently descriptor pools
are discarded when full or context is flushed. This PR allows
descriptor pools to be discarded for reuse.
It is also more conservative and only discard
Descriptor pools when they are full or fragmented.

When using the Vulkan backend a small amount of descriptor memory can leak. Even
when we clean up all resources, drivers can still keep data around on the
GPU. Eventually this can lead to out of memory issues depending on how
the GPU driver actually manages descriptor sets.

When the descriptor sets of the descriptor pool aren't used anymore
the VKDiscardPool will recycle the pools back to its original VKDescriptorPools.
It needs to be the same instance as descriptor pools/sets are owned by
a single thread.

Pull Request: https://projects.blender.org/blender/blender/pulls/144992
2025-08-22 17:11:26 +02:00
Eqkoss / T1NT1N
5658b408df Lights: Rename Spot Size to Beam Angle in UI
This is more consistent with other naming of angles in the user interface,
and more clear.

The identifier has not changed, so no API compatibility is broken.

Fix #144527

Pull Request: https://projects.blender.org/blender/blender/pulls/144661
2025-08-22 16:47:50 +02:00
Campbell Barton
41b2ab6b40 Cleanup: check the blend-file path isn't empty before comparing
While harmless in these cases, it can cause problems (see [0]) if the
other path happen to be an empty string.

[0]: ffbd078c55
2025-08-23 00:37:30 +10:00
Campbell Barton
420d45ceb4 BLI_noise: suppress signed int overflow warnings for hash_pcg2d_*
Ref !144986
2025-08-22 14:33:24 +00:00
Campbell Barton
40e876ab37 Fix #144716: Crash showing menus that referenced panels that don't exist
Unregistering panels could cause popups to crash if those were
referenced. Now fallbacks, non popover behavior is used instead.
2025-08-23 00:19:27 +10:00
Clément Foucault
8ee6bc2c01 EEVEE: Change barriers in the raytracing pipeline
Found when debugging the test regressions on the bot.

Pull Request: https://projects.blender.org/blender/blender/pulls/144985
2025-08-22 15:50:15 +02:00
Aras Pranckevicius
6d1c30fad7 Fix: VSE preview wrong ImBuf variable used
get_texture_colorspace_name accessed byte_buffer instead of
float_buffer; introduced in 18110744a2. In practice VSE seems to
always fill colorspaces, so does not cause a very visible bug.
2025-08-22 16:27:03 +03:00
Aras Pranckevicius
47925fcb69 Cleanup: VSE scopes drawing number typo
"-.0f" was a typo in VSE preview area drawing, was meant to be 1.0f
(introduced in 18110744a2)
2025-08-22 16:27:03 +03:00
Miguel Pozo
f8d61f0735 Fix #144932 : BLI_assert failed: DRW_lock_start(), at 'locked'
Avoid trying to bind the same context twice.

Pull Request: https://projects.blender.org/blender/blender/pulls/144939
2025-08-22 15:22:13 +02:00
Campbell Barton
f28850144d Fix: resolve memory leak in previous fix for #144958
Instead of matching regions, free all popups using
UI_popup_handlers_remove_all which also calls the remove callback
that frees the uiPopupBlockHandle.
2025-08-22 22:23:01 +10:00
Campbell Barton
311231a31c Fix #144958: Crash changing screens with a menu open
Deleting or changing the screen with a popup (error report in this case)
wasn't removing the popup, it would attempt to display using it's
region which had been freed when changing the screen.
2025-08-22 10:45:00 +00:00
Campbell Barton
ffbd078c55 Fix: failure to append with an unsaved blend file
Regression in [0] an unsaved file would be an empty string which could
be equal to "libname" causing them to be considered equal, resulting
in an error thatthe file was linking in itself.

Resolve by only performing this check on saved files.

fa29d28d73
2025-08-22 20:11:24 +10:00
Campbell Barton
4c35ef7a7f Cleanup: rename function for removing handlers, use typed area argument 2025-08-22 19:40:29 +10:00
Jeroen Bakker
0ea1feabd9 Vulkan: HDR support for Windows
This PR adds HDR support for Windows for `VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT`
on `VK_FORMAT_R16G16B16A16_SFLOAT` swapchains .

For nonlinear surface formats (sRGB and extended sRGB) the back buffer is blit into the swapchain,
When VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT is used as surface format a compute shader
is used to flip and invert the gamma.

SDR white level is updated from a few window event changes, but actually
none of them immediately respond to SDR white level changes in the system.
That requires using the WinRT API, which we don't do so far.

Current limitations:
- Intel GPU support
- Dual GPU support

In the future we may add controls inside Blender for absolute HDR nits,
across different platforms. But this makes behavior closer to macOS.

See !144565 for details

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/144717
2025-08-22 10:11:55 +02:00
Jeroen Bakker
366eba1d04 Fix: EEVEE: Memory leak when drawing Volume objects
Pool of VolumeInfo was never reset. Detected when stress testing
the vulkan backend using tree_creature.blend where the world
volume was converted to a volume object.

Pull Request: https://projects.blender.org/blender/blender/pulls/144967
2025-08-22 09:49:56 +02:00
Campbell Barton
addc9db67d Fix #144916: Transform crash pressing tab disabling axis constraint
When disabling cursor constraint NumInput::idx_max was set to -1.
This looks to be the behavior since 2.4x, however more recently
the modulo of `idx_max + 1` was used to cycle the axis when pressing
tab (crashing when `idx_max` is -1).

Resolve by setting `NumInput::idx_max` to the number of axes since
this is the state when transform is initialized.
2025-08-22 07:37:30 +00:00
Campbell Barton
e964f078b5 PyDoc: correct use of back ticks for literal text 2025-08-22 15:10:29 +10:00
Campbell Barton
78c9d16919 PyDoc: correct types, consistent formatting for doc-strings in C++
Correct some types, ensure multi-line docs end with a newline,
sentences end with a full stop.
2025-08-22 14:05:28 +10:00
Andrej730
e41fdebf3a PyDoc: UILayout.introspect(), add missing return value type
Ref !143353
2025-08-22 03:42:34 +00:00
Campbell Barton
db3db2876f Cleanup: quiet compiler warning 2025-08-22 13:42:28 +10:00