Commit Graph

149049 Commits

Author SHA1 Message Date
Hans Goudey
13e0e8bd6d Viewport: Fix quadratic runtime for object box selection
Replace a linear search through all objects for every single selection
result with a Map from select ID to object base. This makes the runtime
linear instead of quadratic, resulting in a 100x performance improvement
from 6s to 60ms when selecting about half of 60k objects in a scene.

Pull Request: https://projects.blender.org/blender/blender/pulls/137832
2025-04-24 14:53:06 +02:00
Clément Foucault
59df50c326 GPU: Refactor Qualifier and ImageType
This allow to use types closer to GLSL in resource
declaration.

These are aliased for clarity in the GPU
module (i.e. `isampler2D` is shortened to `Int2D`).

Rel #137446

Pull Request: https://projects.blender.org/blender/blender/pulls/137954
2025-04-24 14:38:13 +02:00
Pablo Vazquez
3d5eda688d UI: Theme: Fix inconsistencies in Light theme
Just small tweaks that should have been addressed when the editor
border theme setting was introduced.

* Fix: Match Top Bar and Status Bar headers with editor border.
* Fix: Properties Editor navigation bar and tabs outline tweak for
  readability.
* Use light color for editor outline/active.

Pull Request: https://projects.blender.org/blender/blender/pulls/137955
2025-04-24 13:59:06 +02:00
Clément Foucault
b8f591c348 Cleanup: Overlay: Share line width macros
Pull Request: https://projects.blender.org/blender/blender/pulls/137953
2025-04-24 13:48:51 +02:00
Clément Foucault
77ed9359dc Cleanup: Overlay: Share vertex enum values 2025-04-24 13:48:51 +02:00
Clément Foucault
d2373cf5d5 Cleanup: Overlay: Use enums instead of defines 2025-04-24 13:48:51 +02:00
Christoph Lendenfeld
09df710eff Refactor: pose select enum to enum class
No functional changes.

This patch converts the `ePose_SelectSame_Mode` enum to an enum class
called `SelectRelatedMode`.
This is done in preparation of adding more modes to the operator.

Pull Request: https://projects.blender.org/blender/blender/pulls/137952
2025-04-24 13:26:56 +02:00
Weizhen Huang
23c762e388 Fix: Cycles: Do not count volume bounds bounce as transparent
In forward path tracing, when we pass volume bounding meshes, we
accumulate `volume_bounds_bounce`. We should match this behaviour in NEE
instead of accumulating `transparent_bounce`.

Pull Request: https://projects.blender.org/blender/blender/pulls/137556
2025-04-24 13:10:33 +02:00
Pablo Vazquez
1cd2b34685 UI: Theme: Update missing properties in Light theme
Save over the light theme so new/removed properties get updated.

No major visual changes expected.
2025-04-24 13:02:13 +02:00
Brecht Van Lommel
b9e68ca675 Fix #137683: Cycles issue with persistent data and motion blur
The object was not properly tagged for update when syncing object motion
blur transforms. This caused issue with the camera in volume test after
recent scene update refactoring in 86b67a20d6, but potentially also
other ones.

Pull Request: https://projects.blender.org/blender/blender/pulls/137930
2025-04-24 12:56:52 +02:00
Clément Foucault
c1493a9518 Fix #137756: EEVEE: Crash when saving while using textured volume on world
This happened because the Volume module was not initialized
before `begin_sync` which was using it.
2025-04-24 12:52:02 +02:00
Clément Foucault
3f11d16501 Cleanup: DRW: Make all shader resource snake case
This make sure that the DRW folder is compliant to our codestyle.

Pull Request: https://projects.blender.org/blender/blender/pulls/137673
2025-04-24 12:50:45 +02:00
Omar Emara
ad49181f90 Compositor: Turn Plane Track Deform options to inputs
This patch turns the options of the Plane Track Deform node into inputs.

Reference #137223.

Pull Request: https://projects.blender.org/blender/blender/pulls/137949
2025-04-24 12:47:15 +02:00
YimingWu
123b36ff47 Fix #137528: Grease Pencil: Swap bezier handles when joining strokes
Previously when joining strokes, only point order is reversed as needed
without taking care of bezier handle positions, this can cause bezier
typed strokes to be joined with reversed handles. This fix swaps left/
right handle attributes together with points in `reverse_points_of` call.

Pull Request: https://projects.blender.org/blender/blender/pulls/137533
2025-04-24 10:16:21 +02:00
Omar Emara
39b8d4b582 Cleanup: Mark NodeChroma members as deprecated 2025-04-24 10:08:43 +02:00
Omar Emara
290c015a75 Compositor: Turn Stabilize node options to inputs
This patch turns the options of the Stabilize node into inputs.

Reference #137223.

Pull Request: https://projects.blender.org/blender/blender/pulls/137911
2025-04-24 09:34:30 +02:00
Philipp Oeser
25bc5788d6 Fix #137877: rigid body affected by forcefield even at strength zero
Blender translates the "Dynamic" setting (`RBO_FLAG_DISABLED`) into a
bullet _kinematic state_ (see `RB_body_set_kinematic_state` /
`CF_KINEMATIC_OBJECT`). This is different from the _activation state_
(done through e.g. `RB_body_set_activation_state`) and also different
from the active/passive type. So we have (at least) three levels to
control this.

And it seems like even though a bullet body is fully intended to be
kinematic (aka animated), it still accumulates forces from the
`RB_body_apply_central_force` call. I have not tracked this down
further, but it _seems_ logical to only apply forces on a body with
the "Dynamic" setting.

Tested this with activation/deactivation (with seems intact), so in my
limited tests I wasnt able to break it

Pull Request: https://projects.blender.org/blender/blender/pulls/137901
2025-04-24 09:23:27 +02:00
Philipp Oeser
0a27641b8f Fix #137899: NW: Saving Viewer Node returns to Geometry Node Editor
To resolve, remember the editor `tree_type` and set that when returning
from the `IMAGE_EDITOR` to the `NODE_EDITOR`

Pull Request: https://projects.blender.org/blender/blender/pulls/137904
2025-04-24 09:20:43 +02:00
Campbell Barton
79583c4ba8 Cleanup: use memcpy whrn when the string size is known 2025-04-24 05:21:01 +00:00
Campbell Barton
2d2da30e7b Cleanup: add utility function to access the screen region by type 2025-04-24 05:14:15 +00:00
Sean Kim
e27be7cfc6 CMake: Rename and expose 'USE_EXPERIMENTAL_TESTS' option
The `USE_EXPERIMENTAL_TESTS` variable was not exposed as an option, so
the two tests that use the option to check whether tests should be run
had to be manually enabled by changing `tests/python/CMakeLists.txt`.

This commit renames the variable to `WITH_TESTS_EXPERIMENTAL`, defaults
the option to `OFF`, and marks it as an advanced option.

Pull Request: https://projects.blender.org/blender/blender/pulls/133831
2025-04-24 06:11:30 +02:00
Aaron Carlisle
f8c40617ac Cleanup: Return early instead of goto to end of function 2025-04-23 23:05:04 -04:00
Alaska
6068e05c11 Fix #137676: Clamping of rendered results with OIDN GPU denoising
According to the OptiX denoising guide lines, renders should be in the
0..10000 range. As a result, clamping was applied to renders
prior to GPU denoising.

However this lead to a issue where denoising of bright images would
behave differently between CPU OIDN and GPU OIDN as this same clamping
was also applied to the GPU OIDN denoiser.

According to Attila Áfra, a developer working on OIDN, this clamping
isn't neccesary for OIDN. So this commit removes the clamping from
OIDN.

Pull Request: https://projects.blender.org/blender/blender/pulls/137879
2025-04-24 04:57:36 +02:00
Campbell Barton
01c32a9ccc Cleanup: trailing space 2025-04-24 12:44:27 +10:00
Campbell Barton
8ccdea1934 Cleanup: typos & references to variable names from recent refactor 2025-04-24 02:43:52 +00:00
Campbell Barton
85913eb58a Fix #137380: Exiting edit-mode while transforming crashes
Python scripts could call operators to change the objects mode while
transforming. Report an error instead of crashing.
2025-04-24 12:28:49 +10:00
Campbell Barton
4237e6134c Docs: note what git_data_canonical_authors.py is used for. 2025-04-24 01:30:11 +00:00
Sietse Brouwer
9b8be181ba Fix #137386: UI: Show Default Dursor in Paint Mode Menus and Dialogs
Ensure the use of the default mouse pointer cursor in paint mode
dialogs and menus by checking for temporary regions before setting
the "dot" cursor.

Pull Request: https://projects.blender.org/blender/blender/pulls/137793
2025-04-24 01:37:24 +02:00
Sean Kim
83f5480be0 Fix: Revert accidential test submodule hash change
Introduced in 840ed03d92
2025-04-23 15:50:42 -07:00
Pratik Borhade
db700c85d8 Fix: #137772: Marker area obstructing Keyframe Manipulation
Adjust keymap poll function of markers keymap. i.e. when no marker
exists, return false from the keymap so marker operations are not
invoked from key press. Also check whether marker region is visible.
If its is hidden, we can skip the markers keymap.

Pull Request: https://projects.blender.org/blender/blender/pulls/137803
2025-04-24 00:07:02 +02:00
Sean Kim
840ed03d92 Cleanup: make format 2025-04-23 13:22:03 -07:00
Hans Goudey
0e0d1d4cba Sculpt: Add Manifold Boolean solver, avoid BMesh conversion for trim
Add the new Manifold solver to the list, and make it the default. Though
it doesn't handle non-manifold sculpt meshes, it makes sense to make it
the default because it's so much faster than the other options, making
the trim tool much more compelling.

Also, instead of joining the object's mesh and the trim mesh as a BMesh,
then running the boolean operation (which requires four conversions
between mesh and BMesh for the non-float solvers), use the same API
as the mesh boolean geometry node. The "join" case is handled
separately now.

Pull Request: https://projects.blender.org/blender/blender/pulls/137915
2025-04-23 21:08:08 +02:00
Miguel Pozo
41ae990b29 Cleanup: Remove StencilViewWorkaround and GPU_texture_view_support()
Texture views should be fully supported everywhere now.

Pull Request: https://projects.blender.org/blender/blender/pulls/137863
2025-04-23 20:57:00 +02:00
Hans Goudey
8db322f1f5 Fix #137902: Manifold boolean modifier solver doubles object transform
The object to world transform was applied to the result (which was
meant to be in world space), rather than the inverse. However, the
processing of transforms is more complicated than necessary. Instead
of passing around a separate "target transform" that's meant to be used
inverted after the boolean operation, just make the input transforms
transform the input meshes into the desired transform space of the
output (object-local space for the modifier).

Pull Request: https://projects.blender.org/blender/blender/pulls/137919
2025-04-23 20:37:53 +02:00
Hans Goudey
ba99f6832e Mesh: Tag no loose vertices for Manifold Boolean output
Saves a tiny amount of time computing the loose vertices cache
after a boolean operation. Since the boolean output is just created
from faces, there are no loose vertices (there are also no loose
edges because of the call to `mesh_calc_edges`, which itself
tags the loose edge cache).
2025-04-23 12:08:10 -04:00
Guillermo Venegas
7417efb0f7 Refactor: UI: Rename uiLayout properties with trailing underscore (2/2)
This completes adding a trailing underscore to all member variables
to distinguish them as private.

Continuation of 7002f16992

Pull Request: https://projects.blender.org/blender/blender/pulls/137906
2025-04-23 16:37:14 +02:00
Omar Emara
f4e46b3fdd Compositor: Turn ID Mask node options to inputs
This patch turns the options of the ID Mask node into inputs.

Reference #137223.

Pull Request: https://projects.blender.org/blender/blender/pulls/137905
2025-04-23 16:31:27 +02:00
YimingWu
b795f09e22 Fix #134774: Modeling: Show warning when some objects failed to convert
Object conversion operator used to fail silently when encountered
unsupported object types. Now it will show a warning message instead
so users will have a visual feedback when nothing is happening.

Pull Request: https://projects.blender.org/blender/blender/pulls/134827
2025-04-23 16:23:41 +02:00
Pratik Borhade
4b3888b2c0 Fix #137873: Crash when Attempting to Open a Template
pprop pointer created before initialization of op->customdata i.e.
`text_open_init()`. This triggers crash due to accessing member of
nullptr object `pprop->prop`

Pull Request: https://projects.blender.org/blender/blender/pulls/137880
2025-04-23 15:43:38 +02:00
Omar Emara
8c616a8a00 Compositor: Turn Keying node options to inputs
This patch turns the options of the Keying node into inputs.

In the process, some options were renamed for clarity and consistency
with other nodes.

Reference #137223.

Pull Request: https://projects.blender.org/blender/blender/pulls/137900
2025-04-23 15:33:22 +02:00
Ray Molenkamp
aced31fd3f Fix #137552: change REINSTALLMODE to amus
This changes the REINSTALLMODE [1] from the default omus
to amus. this isn't recommended [2] but CMAKE [3] has been doing
it for 6 years now without issues, so it will probably be fine?

[1] https://learn.microsoft.com/en-us/windows/win32/msi/reinstallmode
[2] https://stackoverflow.com/a/71225056/1938798
[3] https://github.com/Kitware/CMake/blame/master/Utilities/Release/WiX/WIX.template.in#L28

Pull Request: https://projects.blender.org/blender/blender/pulls/137668
2025-04-23 15:26:13 +02:00
Hans Goudey
d2ee1224a3 Cleanup: Use slightly larger inline buffer for per-vertex stack array 2025-04-23 09:13:39 -04:00
Hans Goudey
2e0a4d23ad Cleanup: Use std::abs instead of fabsf 2025-04-23 09:13:39 -04:00
Campbell Barton
9356b12bd5 Fix: potential crash from null pointer dereference
Null check the operator member as this is documented to be null
and is checked elsewhere in the handler logic.

Co-authored-by: Kabinet0 <m3kabin@gmail.com>

Ref !137506
2025-04-23 22:57:32 +10:00
Guillermo Venegas
45db049073 Refactor: UI: Rename uiLayout properties with trailing underscore (1/2)
This adds trailing underscore to many member variables
to distinguish them as private.

Continuation of 7002f16992

Pull Request: https://projects.blender.org/blender/blender/pulls/137872
2025-04-23 14:54:06 +02:00
Howard Trickey
38459c9508 Tests: New tests/data version to include boolean manifold test. 2025-04-23 07:22:51 -04:00
Campbell Barton
570e9d2bb3 Cleanup: correct logic for qsort callback
Adding the additional check is more of a "technical" correction,
for the callback to return 0 the sort implementation would have
to compare an element in the array with itself.

Co-authored-by: Zheng-Ze <zheng-ze@noreply.localhost>

Ref !137723
2025-04-23 20:48:56 +10:00
Guillermo Venegas
587ddace88 Cleanup: Remove redundant node wrangler operator
615100acda added support to
`NODE_OT_add_image` to open multiple images, This makes the NW
operator redundant, also `NODE_OT_add_image` can open multiple
images at drag-n-drop. The only difference is that this operator adds
the new image nodes as collapsed nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/128443
2025-04-23 11:51:07 +02:00
Campbell Barton
e1fa41ab5d Viewport: use "Show Extras" to control texture space & bounds
Follow up to !136523 which hid rigid-body collision shape
when extras were disabled.
2025-04-23 09:44:56 +00:00
Thomas Dinges
453d20aeeb Cleanup: Whitespace in issues script 2025-04-23 11:18:14 +02:00