Commit Graph

150077 Commits

Author SHA1 Message Date
Miguel Pozo
f2c7e60a8c Fix #135357: Overlay-Next: Reference images briefly disappear when entering orthographic view
depth_bias_winmat_ is computed after sync.
2025-03-03 13:46:13 +01:00
Clément Foucault
127a5d6d3a Cleanup: GPU: Shader C++: Avoid #pragma once in main file warning
Pull Request: https://projects.blender.org/blender/blender/pulls/135384
2025-03-03 12:50:47 +01:00
Clément Foucault
783472671e Cleanup: GPU: Add macro for default constructor compatibility on MSL 2025-03-03 12:50:45 +01:00
Clément Foucault
2c20c200bf Cleanup: GPU: Remove warning about is_zero redundant declaration 2025-03-03 12:50:45 +01:00
Bastien Montagne
666267ef40 Fix assert in BKE_main_namemap when reusing brush assets on fileload.
Code in readfile that copies over brush assets (and related data) from
the old Main to the new one cannot use the namemap reliably, due to how
the linked IDs of the library get temporarily spread between both Mains.

Since in theory there should be no need for name uniqueness processing
in this case anyway, for now disable the relevant code when the library
is re-used.

NOTE: Issue reported in #135315, revealed by recent refactor in
00f406c34c and 16e552298c.

NOTE: This fix is a bit hackish, but seems to be the simplest most
straight-forward way to address the problem. More invasive solution can
be investigated if this proves to still be problematic.

NOTE: While 4.4 also has the same invalid handling, this PR should
likely not be ported to it, as previous BKE_main_namemap code was more
permissive with such invalid behaviors, and there is no known bad
consequences in practice.

Pull Request: https://projects.blender.org/blender/blender/pulls/135362
2025-03-03 11:34:48 +01:00
Bastien Montagne
4a6e73c3e6 Merge branch 'blender-v4.4-release' 2025-03-03 11:03:47 +01:00
Bastien Montagne
008826cf2b I18N: Updated UI translations from git/weblate repository (c8d9807f023). 2025-03-03 11:03:24 +01:00
Jeroen Bakker
4bf3c36c6a Cleanup: Subdiv: Missing usage binding defines
Patch evaluation shaders has defines, but they were not used. This PR
cleansup the incremental binding by using these defines.

Pull Request: https://projects.blender.org/blender/blender/pulls/135379
2025-03-03 11:03:12 +01:00
Habib Gahbiche
b0fbd9154e Fix: 2D cage gizmo rotation part not being highlighted
The transform gizmo in the sequence editor does not show highlights properly for rotation, when hovering over it or while dragging it.

This patch has no further side effects on operators that use the 2d cage gizmo without rotation such as the crop gizmo and the viewer (transform) gizmo in the compositor.

Pull Request: https://projects.blender.org/blender/blender/pulls/135065
2025-03-03 10:46:20 +01:00
Jesse Yurkovich
ae1a5aa2a1 Fix: USD: Incorrect call to Map::add_new during dupli-vert export
Mistake in 6704647c66. Test coverage being added for another bug fix
uncovered this one.

Problem occurs when exporting an object that is duplicating at least two
other objects with the dupli vert system.

Pull Request: https://projects.blender.org/blender/blender/pulls/135369
2025-03-02 22:51:23 +01:00
Harley Acheson
1ad39b95d9 Merge branch 'blender-v4.4-release' 2025-03-02 12:39:19 -08:00
Harley Acheson
1a72a0f22c Fix #135295: Always Restore Previous Editor with set_or_cycle
ED_area_newspace correctly changes an area's space when the type and
subtype are set beforehand. But SCREEN_OT_space_type_set_or_cycle, when
changing to a new editor rather than cycling, needs newspace to ignore
the set subtype and use the last-used saved in the space. This
situation cannot be tested for in newspace. Instead have the operator
pass -1 as subtype to signal this intended behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/135367
2025-03-02 21:38:02 +01:00
Julien Duroure
2810c16e92 Merge branch 'blender-v4.4-release' 2025-03-02 08:03:51 +01:00
Julien Duroure
5ddff2562b Fix: glTF Exporter: Another sanity check about slot 2025-03-02 08:02:56 +01:00
Julien Duroure
3c4c026efe Merge branch 'blender-v4.4-release' 2025-03-02 08:00:40 +01:00
Julien Duroure
bb2f74e8ce Fix: glTF Exporter: Avoid crash when action has no slot assigned 2025-03-02 07:59:42 +01:00
Campbell Barton
98aee659cf Merge branch 'blender-v4.4-release' 2025-03-02 15:50:15 +11:00
Campbell Barton
0fc7b7ef9a Merge branch 'blender-v4.4-release' 2025-03-02 15:50:09 +11:00
Campbell Barton
2be7586bce Fix the line-width controlling UI element scale & drag threshold
The line-width is used to calculate the `U.pixelsize` which should only
be used to control the size of lines & points.

Update doc-strings to mention the intended use, remove unused defines.
2025-03-02 15:46:22 +11:00
Hans Goudey
0d28c93f08 Cleanup: Sculpt: Use Map instead of GHash for dyntopo edge collapse 2025-03-01 18:11:44 -05:00
Hans Goudey
aafcc5d3b9 Cleanup: Use references, nodiscard, for BMesh partial update 2025-03-01 18:02:30 -05:00
Hans Goudey
64c3fd7b1c Cleanup: Use Vector, BitVector for BMesh partial update struct
Avoid reimplementing amortized growth, and generally make
the code friendlier with the improved BitVector class.
2025-03-01 17:47:55 -05:00
Hans Goudey
76a253a973 Fix: Potential issue in BMesh points index buffer extraction
The same fix as 81d5af15a6.
That commit only applied the change to Mesh, not BMesh.
2025-03-01 17:46:33 -05:00
Hans Goudey
b8cebdc9fe Fix #135333: Node tools crash with empty mesh input
The implicit sharing info can actually be null when there is
no shared array data.
2025-03-01 12:24:28 -05:00
Hans Goudey
8fe63f0ad8 Cleanup: Remove outdated references to GHash 2025-03-01 12:10:18 -05:00
Pratik Borhade
725617c7a0 Fix #135185: Delete pose asset crash
This is due to accessing member of nullptr Asset. After deleting the
action id from asset library, `CTX_wm_asset` won't return value because
force reset for files was tagged (`FL_FORCE_RESET_MAIN_FILES`).
Instead of updating library from active asset, use library reference to
clear then read/draw the updated asset library

Pull Request: https://projects.blender.org/blender/blender/pulls/135219
2025-03-01 14:56:24 +01:00
Sean Kim
de3c473ebb Cleanup: Various non-functional changes for bmesh_log.cc
* Uses const where possible
* Joins declaration with assignment
* Use std::array where possible instead of C-style array
* Use float3 instead of C-style array for position and normal
* Reduces scope of variables where possible

Pull Request: https://projects.blender.org/blender/blender/pulls/135336
2025-03-01 07:06:55 +01:00
Alaska
073872ebab Tests: Add Cycles tests for ray visibility on lights
In a recent refactor (1), ray visibility for lights was accidentally
broken. To help detect issues like this in the future, this commit
adds tests specifically for this case.

Ref: blender/blender-test-data!61
(1) https://projects.blender.org/blender/blender/commit/e813e46327dca72
2025-03-01 05:52:18 +01:00
Sean Kim
e6384bcce6 Cleanup: Switch GHash for blender::Map for bmesh_log.cc
This commit changes usages of `GHash` inside `bmesh_log.cc` into their
equivalent `blender::Map` declarations and functions.

Additionally, some debug functions are put inside a NDEBUG section
instead of being kept in a broken state behind `#if 0`

Pull Request: https://projects.blender.org/blender/blender/pulls/135276
2025-03-01 05:13:32 +01:00
Alaska
97a1ec8063 Tests: Add a Cycles test for #135200
A recent bug fix to light tree building lead to a issue where some
lights with light linking would incorrectly share nodes in the
light tree.

To help detect failures like this in the future, this commit adds a
test based on the file found in the original report
blender/blender#135200.

Ref: blender/blender-test-data!63
2025-03-01 02:14:44 +01:00
Alaska
ab20b745a6 Merge branch 'blender-v4.4-release' 2025-03-01 14:02:35 +13:00
Alaska
b3b80deac1 Fix #135294: Improve missing VR support error message on macOS
This commit improves the error message explaining why VR isn't
supported on the macOS platform.

Pull Request: https://projects.blender.org/blender/blender/pulls/135302
2025-03-01 02:00:57 +01:00
Hans Goudey
8b297ab168 Cleanup: Use bNodeTree all_nodes() accessor method
This is always built at runtime.

Pull Request: https://projects.blender.org/blender/blender/pulls/135321
2025-02-28 22:12:34 +01:00
Harley Acheson
46ddd76609 Merge branch 'blender-v4.4-release' 2025-02-28 12:38:10 -08:00
John Kiril Swenson
f874d46589 Fix: UI: Transform Feedback for Invalid Trackball
Patch #132957 added helpful UI feedback when attempting to rotate or
scale an object whose transforms are set to "only affect locations."
But it neglected to check for invalid trackpad rotations that are
affected the same way. This patch renames the original `HLP_ERROR` to
`HLP_ERROR_DASH` to distinguish it from a `HLP_ERROR` transform cursor
with no dashed line present, which matches trackball's normal state.

Pull Request: https://projects.blender.org/blender/blender/pulls/134653
2025-02-28 21:14:36 +01:00
Jacques Lucke
613bb9771b Nodes: UI: support panel toggles in materials tab
This adds support for panel toggles from 2822777f13
to the materials tab in the properties editor. At the same
time, it also starts making use of layout panels which
offer a more standardized UI than the ad-hoc panels
implementation that was used there beforehand.
2025-02-28 20:06:28 +01:00
Jacques Lucke
53d8390c1b Cleanup: remove redundant layout panel function
While using the other function is a little more verbose, it's also more
explicit and having two functions this similar is confusing.
2025-02-28 19:33:07 +01:00
Jacques Lucke
c3957f432a Fix: Nodes: only expose panel toggles in geometry and shader nodes
The compositor does not support boolean sockets currently.
2025-02-28 19:23:44 +01:00
Falk David
2822777f13 Nodes: support boolean inputs as toggles in panel headers
Adds the option to create a boolean socket that can be used as a panel toggle.
This allows creating simpler and more compact node group UIs when a panel
can be "disabled".

The toggle input is a normal input socket that is just drawn a bit differently in
the UI. Whether a boolean is a toggle input or not does not affect evaluation.

Also see #133936 for guides on how to add and remove panel toggles.

Pull Request: https://projects.blender.org/blender/blender/pulls/133936
2025-02-28 19:07:02 +01:00
Harley Acheson
21e14163c6 Merge branch 'blender-v4.4-release' 2025-02-28 10:05:31 -08:00
Harley Acheson
ead7a881a5 Fix: Constrain Docking Hint to Window Bounds
While joining and docking areas there is hint shown near the mouse that
describes the potential operation. But it is cut off if your mouse is
at the extreme right or bottom edge of the window. This PR just clamps
the position so it is always visible.

Co-authored-by: Jonas Holzman <jonas@holzman.fr>
Pull Request: https://projects.blender.org/blender/blender/pulls/135211
2025-02-28 19:04:22 +01:00
Sergey Sharybin
ad30bdd470 Merge branch 'blender-v4.4-release' 2025-02-28 19:02:39 +01:00
Sahar A. Kashi
99a487a07c Fix: Cycles HIP-RT curve motion blur and motion pass
Various fixes in the HIP-RT BVH building related on making sure
curves motion blur is supported and is working correctly, as well
as properly handle motion pass configuration when path tracing is
to ignore motion blur (and instead write vector pass).

This PR contains #134797 with fixes needed to fully finish it:
moving commits from that PR here made it easier to ensure all
moving parts are tested without mental overhead.

Fixes #134510

Co-authored-by: Sahar A. Kashi  <sahar.alipourkashi@amd.com>
Co-authored-by: Sergey Sharybin <sergey@blender.org>
Co-authored-by: Brecht Van Lommel <brecht@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/135125
2025-02-28 19:02:03 +01:00
Jacques Lucke
e09381a716 Fix: use selected objects in Visual Geometry to Objects operator
Previously, only the active object was taken into account.
2025-02-28 18:21:08 +01:00
Bastien Montagne
16e552298c Refactor: Core: ID's 'namemap' used to generate unique ID names.
Note: This commit is essentially non-behavioral change, expect in some
fairly rare edge cases.

This commit does a few things:
* Move the whole BKE_main_namemap code to modern C++.
* Split API calls to work with the global namemap, or the local ones.
* Simplify and make the code easier to follow and understand.
* Reduce 'default' memory usage by using growing BitVector for numeric
  suffix management, instead of a fixed 1K items.
* Fix inconsistent handling of 'same base name and numeric suffix,
  different name' issues (e.g. 'Foo.1' and 'Foo.001'), see
  `re_create_equivalent_numeric_suffixes` new unittest.
* Fix completely broken handling of `global` namemaps. This was
  (probably!) OK so far because of their currently very limited
  use-cases.

It also adds a few minor improvements to existing behavior (essentially
in exotic rare edge cases):
* Names that get too long are now only shortened by one char at a time,
  trying to modify the requested base name as little as possible.
* Names that are short, but for which all the manageable numeric suffixes
  are already in use, are extended with an (increasing)  number, instead
  of being shortened.

This work also allowed to detect a few (apparently harmless?) bugs in
existing code, which have been fixed already in 4.4 and main, or in this
commit as well when they depend on changes in namemap code itself.

About performances: This commit introduces a minor slow-down. Some tests
heavily relying on this code (like `bl_id_management` and `blendkernel`
e.g.) get slightly slower (resp. about 1% and 5%). This seems to come
mostly from the added complexity to handle correctly multiple different
names with the same base and numeric suffix value ('Foo.1' and
'Foo.001', but also in the global namemap context where IDs from
different libraries can have the same name).

Pull Request: https://projects.blender.org/blender/blender/pulls/135199
2025-02-28 17:58:58 +01:00
Sean Stirling
5372346978 Cycles: oneAPI: Use linear USM memory for 1D images
Rewrite the ONEAPI Blender texture allocation code to make use of
1D images backed by linear USM memory. This increases parity
with the CUDA implementation and sets the ground work for enabling
host USM allocations in Blender. By enabling this functionality,
previously failing benchmarks are now passing.

Together with the previous commit, no functional changes are expected.
2025-02-28 17:52:41 +01:00
Nikita Sirgienko
dcbc7c1623 Cycles: oneAPI: Remove some texture code from the squished bindless texture commit
This code will be reintroduced back shortly, but under proper credentials.

No functional changes are expected along with the next commit.
2025-02-28 17:51:35 +01:00
Brecht Van Lommel
5caeac4474 Fix: Cycles performance regression after refactor for light objects
Thanks to Xavier Hallade for finding the cause.

Caused by #134846, e813e46327.

Pull Request: https://projects.blender.org/blender/blender/pulls/135309
2025-02-28 17:40:03 +01:00
Brecht Van Lommel
6c29dbff10 Merge branch 'blender-v4.4-release' 2025-02-28 17:38:28 +01:00
Gracjan Jeżewski
901353ce4c Fix: Hydra camera missing depth of field parameters
Add the missing F-Stop and Focus Distance.

Pull Request: https://projects.blender.org/blender/blender/pulls/134896
2025-02-28 17:37:35 +01:00