Commit Graph

120894 Commits

Author SHA1 Message Date
Sybren A. Stüvel
5fdcddbc4f Merge remote-tracking branch 'origin/blender-v4.5-release' 2025-06-22 11:55:46 +02:00
Sybren A. Stüvel
de22f32656 Fix #140700: Blender 4.5 Crashes When Performing Loop Cut
Correct an oversight in df6d345bb4: without proportional editing, all
the transform data is "selected" by definition. This means that the
assumption "the selected data is sorted first in the array" is
trivially true, without calling any sorting function. So instead of
using the sorted index map in these cases, just fall back to regular
iteration.

To make the code handle this nicely, I made two "foreach" functions.
The first one transparently uses the sorted index map when available,
and performs regular iteration otherwise. The second function only
visits the selected items.

This makes the usage of these functions clearer, and the fact that
selected items are expected to be sorted first (either trivially or
explicitly) can be documented in a central place.

Pull Request: https://projects.blender.org/blender/blender/pulls/140720
2025-06-22 11:54:17 +02:00
Aaron Carlisle
98d11bf445 Cleanup: Use "Custom Normals" in code comments
Follows up on f0675f05a7 and corrects the terminology in some code comments.
2025-06-21 19:42:04 -04:00
Aaron Carlisle
f0675f05a7 UI: Make Custom Normal naming consistent
This changes the naming of "Custom Split Normals" or "Split Normals" to be "Custom Normals"

This addresses #134744, only UI naming has been adjusted.
Internal/External APIs are left unchanged.

Pull Request: https://projects.blender.org/blender/blender/pulls/140440
2025-06-22 01:28:02 +02:00
Sean Kim
17f5c826bb Fix: Incorrect UnifiedPaintSettings compatibility writing
Mistake in 582c7d94b8.

The `ToolSetting` struct needs to be written after changing the
in-memory value.

Pull Request: https://projects.blender.org/blender/blender/pulls/140775
2025-06-22 00:03:16 +02:00
Sean Kim
3d507c4afe Merge branch 'blender-v4.5-release' 2025-06-21 15:02:38 -07:00
Sean Kim
99d4e7e330 Fix: Incorrect file version for brush forward compatibility code
Mistake in 6a03e8249d

Pull Request: https://projects.blender.org/blender/blender/pulls/140777
2025-06-22 00:02:03 +02:00
Campbell Barton
827fc096ae Merge branch 'blender-v4.5-release' 2025-06-21 16:51:08 +10:00
Campbell Barton
5280ebc289 NDOF: all spaces now follow the navigation mode preference
Restore expected behavior of the NDOF, especially in the context of
non-3D editors. It addresses the following issues:

- Object mode, 3D viewport:
  With "Lock Horizon" off, the rotation axes will invert unexpectedly,
  making the camera behave similar to a "Fly mode".

- Fly mode, 2D editors:
  Changing a navigation mode to "Fly" makes no effect.
  Applies to UV and Nodes editors, Camera Preview etc.

Related to #140165

This includes some minor API changes back-ported from `main`
since the PR was created for `main`.

Co-authored-by: Patryk-Skowronski <patryk_skowronski@3dconnexion.com>

Ref !140537
2025-06-21 16:38:51 +10:00
Sean Kim
a59ee6b2d0 Cleanup: Replace init/free functions for MultiresReshapeSmoothContext
Pull Request: https://projects.blender.org/blender/blender/pulls/140513
2025-06-21 02:42:36 +02:00
Sean Kim
ae8b2a827d Cleanup: Use Span<float3> instead of pointers for multires_reshape.cc
* Converts the old `vertcos` to a `Span<float3>`
* Reduces visibility of helper function.

Pull Request: https://projects.blender.org/blender/blender/pulls/140512
2025-06-21 02:40:56 +02:00
Sean Kim
4434a30d40 Paint: Make UnifiedPaintSettings a per-mode instead of scene-wide value
Historically, the `UnifiedPaintSettings` struct has been used to
provide users the ability to set brush values at a scene level. Examples
of such attributes are the brush size, strength, and color, to name a
few.

Instead of these values being shared across all of the grease pencil,
mesh painting, and curves sculpting modes. This commit migrates the
data to the `Paint` struct, meaning that each individual mode (e.g.
Sculpt, Vertex Paint, Grease Pencil Draw) now has the ability to change
these values without affecting other modes.

While this change is large, the majority of the work is simply
refactoring access to the `UnifiedPaintSetting` struct. to ensure the
correct property is being retrieved.

Resolves #134077

Pull Request: https://projects.blender.org/blender/blender/pulls/139766
2025-06-21 02:35:14 +02:00
Aras Pranckevicius
11bf3dd71e VSE: Text Strip supports text longer than 512 bytes
Text strip had a fixed size buffer of 512 bytes to hold the displayed
text (this can be much fewer actual characters with non-English
languages). Switch to dynamically allocated buffer instead, which can
hold longer text.

In order to support forward/backward compatibility, TextVars continues
to hold the 512 byte buffer in memory. When writing out the .blend file,
dynamic text buffer is copied into the fixed one. If it is longer, the
text is truncated, so opening the .blend file in an older version
will contain the first 512 bytes of the longer text. When reading
existing files without the dynamic text buffer, it is created from the
static buffer. Conceptually this approach is similar to constraints
name length increase PR !137310.

The text strip editing code was switched to operate on the dynamic
buffer, resizing it as needed. seq::CharInfo internal struct was
switched to be more independent of the actual buffer address; now
each char entry just stores an index into the buffer instead of direct
pointer (side effect: makes the struct smaller as well).

Pull Request: https://projects.blender.org/blender/blender/pulls/140733
2025-06-20 21:27:12 +02:00
Pablo Vazquez
695a03d9f4 UI: Theme: Add text color settings to panels
Recently, panel styling was moved to a global setting instead of being
per-editor. However, the panel's title and labels inside still rely on
the per-editor region's text and title settings.

Move panel title and text colors to the global "Panel" settings.

See PR for details and screenshots.

Part of #135192

Pull Request: https://projects.blender.org/blender/blender/pulls/140726
2025-06-20 21:03:08 +02:00
Harley Acheson
1b9f9dd96f Fix #140535: Simplify Outliner Drag Feedback
Outliner is currently drawing row highlighting with a combination of
immediate mode drawing and widget shaders. The complaint shows it not
working correctly in some circumstances. This PR simplifies it by using
only widget shaders. There should be no other visual change.

Pull Request: https://projects.blender.org/blender/blender/pulls/140687
2025-06-20 21:02:23 +02:00
Jesse Yurkovich
0b45984b44 Merge branch 'blender-v4.5-release' 2025-06-20 11:47:09 -07:00
Jesse Yurkovich
5c25a24528 Fix: USD: Prevent unreachable assert when processing String attributes
Incoming string attributes from USD have never been fully processed yet
they were added to our list of convertible types. This list originally
came from the Mesh reader before it was made common, but for Meshes the
string type was being skipped elsewhere so there was no harm. Now that
Point Clouds and Curves use this common code, it does matter.

Files containing string attributes for these object types will hit the
`BLI_assert_unreachable` call inside `copy_primvar_to_blender_attribute`
and trace an error to the console requesting the user to file bugs. This
was discovered while looking into the old Moana scene.

Remove the string entry for now as there's no regression in behavior and
it prevents the assert from firing (functionally harmless in Release
builds but the output to the terminal is unnecessary).

Pull Request: https://projects.blender.org/blender/blender/pulls/140681
2025-06-20 20:46:32 +02:00
Aras Pranckevicius
5fff667f83 Fix: VSE text strip editing assert at tiny font sizes
When whole text strip bounding box is narrower than the hardcoded
cursor width (10.0), there was an assert from inside of std::clamp
since min was larger than max.

Pull Request: https://projects.blender.org/blender/blender/pulls/140739
2025-06-20 20:29:32 +02:00
Richard Antalik
2f10db2377 VSE: Draw more correct text boundbox
Text strip along with other effect strips draws into buffer, which is
defined by common render size. However this makes selection, snapping
and other features not work correctly from user perspective.

There are 2 ways to remedy this:
 - Draw text into buffer which size is defined by text boundbox
 - Just draw the correct size boundbox and make UI use it correctly

This PR implements second option, as there are multiple difficulties
asociated with first option. Main problem is, that one would need to
calculate boundboxes for all individual text effects(blur, shadow, ...),
but many of these effects need to know the size of buffer we are trying
to calculate.

Big question here was: What the boundox should look like?
For selection it is best, if it encapsulates the text itself along with its
effects like shadow, blur or box. However for snapping and pivot range
it seems, that encapsulating only the text without any effects applied is
the best solution. This was discussed with UI module and we agreed,
that encapsulating only the text would provide better usability.

The implementation:
Most of the features are on "preview side", where all dimensions are
related to scene render size. Temporary `TextVarsRuntime` is created to
calculate apparent text strip image size. This allows boundbox of
correct size to be drawn.

However to draw boundbox and do transformations correctly, it is
necessary to remap origin point to the subset of image defined by the
boundbox. Since recalculated origin is relative, this function is used
for image transformation during rendering as well.

Main drawback of this method is, that boundbox and origin point
calculation may be needed from multiple places, and `TextVarsRuntime`
may be recalculated about 10x on redraw. `text_effect_calc_runtime`
function can be executed from ~5us for single character to 0.5ms with
512 characters with default font(not sure if that matters).

Drawing origin only during transformation would help with general UI
responsiveness. During playback, these overlays are not drawn, so
there should be no change in performance.

Pull Request: https://projects.blender.org/blender/blender/pulls/140420
2025-06-20 20:06:11 +02:00
Hans Goudey
86d60ae663 Cleanup: Build errors without unity builds after recent UI refactor
Caused by 091db9d52b
2025-06-20 13:03:49 -04:00
Pablo Vazquez
dbba0baa03 Fix: Theme: Properties editor missing region style
The Properties editor does not have a sidebar, but it has a navigation bar.
Missed this in fe0fe0a5ed

Pull Request: https://projects.blender.org/blender/blender/pulls/140728
2025-06-20 18:58:00 +02:00
Hans Goudey
e3ddc9be2b Grease Pencil: Avoid overhead when filling triangle index buffer
Avoid 4 function calls and computing the min and max index for every
triangle. Instead just fill the index buffer data directly. For me this
gives a 6% FPS playback improvement in the 4.3 splash screen file.

Pull Request: https://projects.blender.org/blender/blender/pulls/140684
2025-06-20 18:21:18 +02:00
Guillermo Venegas
091db9d52b Cleanup: UI: Use UI_interface_layout.hh instead of UI_interface.hh
This removes the include `UI_interface_layout.hh` from
`UI_interface_c.hh`, and in many places this swaps the include
from `UI_interface.hh` to `UI_interface_layout.hh`.

Also, cleanups some `UI_interface.hh` includes with
`UI_interface_icons.hh` or `UI_interface_types.hh`
2025-06-20 18:07:47 +02:00
Hans Goudey
417f8dee40 Merge branch 'blender-v4.5-release' 2025-06-20 11:46:56 -04:00
Hans Goudey
19ef847647 Fix #140689: Paint mode crash with empty Grease Pencil layer
In this case an empty CurvesGeometry didn't contain the position
attribute. Skipping the lookup in that case should be harmless.
2025-06-20 11:40:42 -04:00
Hans Goudey
5d184bd1d6 Fix: Potential memory leak reading AttributeStorage
For unsupported domains, storage types, or other issues with
reading the attribute data, the attribute name and data struct
could be leaked.
2025-06-20 11:40:42 -04:00
Sergey Sharybin
29cab98b7f Merge branch 'blender-v4.5-release' 2025-06-20 17:26:31 +02:00
Sybren A. Stüvel
f3428ed9af Anim: avoid 'unshare' node for custom properties and shapekey values
When creating depsgraph relationships for drivers, avoid creating the
'unshare' depsgraph node for drivers on custom properties and on
shapekey `value` properties.

This should fix a significant part of the performance regression
mentioned in #140706.

Pull Request: https://projects.blender.org/blender/blender/pulls/140724
2025-06-20 16:01:13 +02:00
Lukas Stockner
4800fec44b Merge branch 'blender-v4.5-release' 2025-06-20 15:58:51 +02:00
Lukas Stockner
7f86ec13aa FFmpeg: Fix parameter name in deprecated API 2025-06-20 15:57:39 +02:00
Jacques Lucke
511b291e4a Cleanup: Modifiers: give enums explicit names and reference them in structs
This makes it easier to find the allowed values for an enum.

Pull Request: https://projects.blender.org/blender/blender/pulls/140723
2025-06-20 15:28:46 +02:00
Weizhen Huang
2f7797dd4d Merge branch 'blender-v4.5-release' 2025-06-20 14:20:00 +02:00
Weizhen Huang
efc1daf26b Fix: Missing version bump after removing Preetham and Hosek sky 2025-06-20 14:15:53 +02:00
Lukas Stockner
236b6513cf FFmpeg: Add compatibility code for deprecated codec info API
Direct access to pix_fmts, sample_fmts and supported_samplerates is deprecated
since version 61.13.100, see
https://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3305767560.
Instead, you're supposed to query them via avcodec_get_supported_config(),
so this adds compat code to get rid of 27 warnings.

Pull Request: https://projects.blender.org/blender/blender/pulls/140414
2025-06-20 13:58:36 +02:00
Jeroen Bakker
03caffe540 GPU: Deprecate GPU_DATA_UINT_24_8
GPU_DATA_UINT_24_8 isn't used anymore. We cannot phase out the data type
as it can still be used by add-ons. This PR will deprecate
`GPU_DATA_UINT_24_8`. When used in an add-on a deprecation message will
be shown.

Pull Request: https://projects.blender.org/blender/blender/pulls/140715
2025-06-20 12:17:20 +02:00
Campbell Barton
2e3d19ca4f Merge branch 'blender-v4.5-release' 2025-06-20 19:55:35 +10:00
Campbell Barton
25e3fe21a7 Merge branch 'blender-v4.5-release' 2025-06-20 19:55:32 +10:00
Campbell Barton
c2b96128ca Merge branch 'blender-v4.5-release' 2025-06-20 19:55:28 +10:00
Campbell Barton
bfb6b184f5 Fix #140332: Crash with Python/RNA class registration
Resolve reference counting error in the RNA API which mixed up ownership
between ExtensionRNA::data & StructRNA::py_data.

In practice this generally worked as RNA_struct_free_extension behaved
as if ExtensionRNA owned the reference instead of StructRNA, so as long
as only one reference was removed, there wasn't any difference.

When re-registering Python classes with RNA, ownership wasn't handled
properly which could result in negative reference counts,
crashing in some cases.
2025-06-20 09:54:13 +00:00
Pratik Borhade
0faf2a058e Fix #140079: Redraw outliner after "remove unused" bone collections
After using the Purge Unused Data operator, hovering mouse over outliner
makes outliner tree dirty as the tree is not being rebuilt. The operator is
defined in python which calls `ANIM_armature_bonecoll_remove`. Add
notifier in that function code so that `outliner_main_region_listener`will tag
the outliner region for full redraw.

Pull Request: https://projects.blender.org/blender/blender/pulls/140256
2025-06-20 11:33:11 +02:00
Jacques Lucke
baf68516f0 Fix: Nodes: missing socket descriptions when grouping node 2025-06-20 10:23:32 +02:00
Jeroen Bakker
cdf538e1a7 Merge branch 'blender-v4.5-release' 2025-06-20 09:51:44 +02:00
Jeroen Bakker
d2e88494e1 Cleanup: Vulkan: Remove unused code
Removes `VKTexture::current_layout_` and `VKTexture::init`. The code
was unused since the introduction of the render graph.

Pull Request: https://projects.blender.org/blender/blender/pulls/140708
2025-06-20 09:51:19 +02:00
Bastien Montagne
5ad4f7274a Fix #140694: Segfault with Extra Mesh Objects.
Own dummy copy-paste mistake in dc8e2c09d9.
2025-06-20 09:44:56 +02:00
Campbell Barton
715a8268fa Build: resolve errors & deprecation warnings with Python 3.14 beta
Python 3.14 has moved some functionality into the public API,
use the updated names even with older Python versions.

Also resolve an error caused by variable reuse with delayed annotation
evaluation for TextureProperties_MixIn on startup.

Resolve #140695.
2025-06-20 14:34:25 +10:00
Campbell Barton
6197335658 Build: resolve errors & deprecation warnings with Python 3.14 beta
Python 3.14 has moved some functionality into the public API,
use the updated names even with older Python versions.

Also resolve an error caused by variable reuse with delayed annotation
evaluation for TextureProperties_MixIn on startup.

Resolve #140695.
2025-06-20 04:19:35 +00:00
Harley Acheson
c793bfda23 UI: Area Maintenance Post Op Transitions
While performance area maintenance operations (split, join, docking)
some areas get highlighted and some are shown darkened to indicate they
will be removed. This PR just adds transitions AFTER completion that
eases out this highlighting. Make it less jarring and a little easier
to follow what happens.

Pull Request: https://projects.blender.org/blender/blender/pulls/140628
2025-06-20 03:31:16 +02:00
Pablo Vazquez
fe0fe0a5ed UI: Theme: Remove unused region styling in editors
Move the styling of sidebar/toolbar regions away from common editor
settings into its own section, so styling can be enabled only in the
editors that actually have these regions.

Part of the simplifying theme making, #135192

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/140680
2025-06-19 23:28:48 +02:00
Harley Acheson
551e2d510a Merge branch 'blender-v4.5-release' 2025-06-19 12:04:55 -07:00
Harley Acheson
f3b0600083 Fix #139942: Clear Screen Active_Regions For Inter-Window Area Move
When dragging an area from one window to another it is possible for the
bScreen->active_area to be be invalid for a short period of time. This
is constantly updated so normally not noticeable but will cause ASAN
errors when trying to show keymaps in the status bar as this is use
after free. This PR just sets these to nullptr.

Pull Request: https://projects.blender.org/blender/blender/pulls/140683
2025-06-19 21:03:27 +02:00