Commit Graph

150077 Commits

Author SHA1 Message Date
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
Patrick Huang
6e76bf8917 Fix #126628: Display rigid body collision shape when Extras overlay enabled
The wireframe preview for rigid body collision shape cannot be turned OFF.
Now exclude them when "extras" from overlays panel is disabled.
(This behavior was proposed by @lichtwerk in the original issue)

Pull Request: https://projects.blender.org/blender/blender/pulls/136523
2025-04-23 07:42:05 +02:00
Campbell Barton
d5b254216b Cleanup: correct references to UI_interface_c.hh 2025-04-23 05:29:14 +00:00
Campbell Barton
3bc3453c38 Fix #137856: "Relative Path" missing from Collection>Exporters browser
Add another exception for collection exporting (similar to #137507).

It's possible to avoid these workaround but this involves bigger changes
which are likely API breaking.
2025-04-23 15:17:09 +10:00
Campbell Barton
c1de05aa3b Refactor: don't pass in mesh & object data to edit-mesh undo functions
Avoid confusion from having multiple meshes declared in undo conversion
logic by passing in the meshes vertex group members as arguments.
2025-04-23 03:16:21 +00:00
Campbell Barton
22d0391583 Cleanup: spelling in comments, use doxygen comments for doc-strings 2025-04-23 13:16:20 +10:00
John Kiril Swenson
d89415893e VSE: Change wording for one-time property reports
The new wording shows the new value before the old one, so that this
information can be seen even on small screens, and rearranges the phrasing to
be more succinct.

Pull Request: https://projects.blender.org/blender/blender/pulls/137579
2025-04-23 03:45:15 +02:00
Howard Trickey
dd559259d8 Modeling: Add a new boolean solver based on the Manifold library.
Adds the 'manifold' solver option to the Boolean geo node and to
the Boolean modifier. This solver is about as fast, or faster,
than the current float solver, and is robust against floating
point issues like the Exact solver. But currently it only
works on mesh arguments that are strictly manifold.

See https://projects.blender.org/blender/blender/issues/120182
for many more details.
2025-04-22 21:23:37 -04:00
John Kiril Swenson
7d9499bdc4 VSE: Keep zoom levels constant when resizing
We can apply the `V2D_KEEPZOOM` and `V2D_KEEPOFS_Y` flags to the main VSE
region to make sure this happens. If `V2D_KEEPZOOM` is set, we should update
the view2d's `oldwinx` and `oldwiny` in `ui_view2d_curRect_validate_resize`
just like the `V2D_KEEPASPECT` case.

Divide-by-zero is a real possibility here, since initialization status of
`oldwinx/y` cannot be determined from the `resize` boolean alone (e.g. loading
regions from disk on startup yields a `true` `resize` parameter, so any old
regions that have `KEEPZOOM` added through versioning will get this error since
their `oldwinx/y` is uninitialized). Avoid by initializing `oldwinx/y` if it is zero in
`ui_view2d_curRect_validate_resize`.

Addresses #136508.

Pull Request: https://projects.blender.org/blender/blender/pulls/137802
2025-04-23 03:04:55 +02:00
Loïc 'Lauloque' Dautry
38a58a319d UI: Viewport Shading Modes Tooltips More Descriptive
Viewport shading mode descriptions improved.  "Display only edges of
geometry without surface shading", "Display objects with flat lighting
and basic surface shading", "Preview materials using predefined
environment lights" and "Preview the final scene using the active
render engine".

Pull Request: https://projects.blender.org/blender/blender/pulls/137699
2025-04-22 23:44:41 +02:00
Laurynas Duburas
1d815fdcb8 Cleanup: Remove unused curves NURBS variable 2025-04-22 17:08:45 -04:00
Harley Acheson
e9cc07a24c UI: Changes to Save Startup Dialog
Simplification of the text on the "Save Startup" Confirmation dialog,
trying to reduce jargon and instead focus on the user effect. Title
of "Overwrite Startup File" and body of "Blender will start next time
as it is now." Similar wording for template startups.

Pull Request: https://projects.blender.org/blender/blender/pulls/134429
2025-04-22 23:02:16 +02:00
Sean Kim
d8bab1a65e Fix #137751: Dyntopo undo can crash when drawing attributes
When performing an undo in Sculpt Mode with Dyntopo enabled, it is
possible that the active color attribute exists in the original mesh but
not on the BMesh used by Dyntopo. When attempting to extract this color
data, this can then lead to a crash.

To prevent this, use the BMesh as the source of truth for existence of
generic attributes when mode inside Sculpt Mode when Dyntopo is enabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/137828
2025-04-22 22:24:10 +02:00
Guillermo Venegas
7002f16992 Refactor: UI: Split uiLayout API into separate header
Move most `uiLayout` and `uiItem` functions to a separate
`UI_interface_layout.hh` header file. `uiItem` and `uiLayout` structs
are moved from `interface_layout.cc` to `UI_interface_Layout.hh` in
preparation for switching to an object oriented API style.

`UI_block_layout*` functions are moved to `UI_interface_Layout.hh` too,
since their implementation is also in `interface_layout.cc`

Types shared by `UI_interface_Layout.hh` and `UI_interface_c.hh`
are moved to `UI_interface_types.hh`.

Ref: #117604

Pull Request: https://projects.blender.org/blender/blender/pulls/136717
2025-04-22 22:14:57 +02:00
Pratik Borhade
7f25d1c9d0 Fix #137784: Translate text in status bar when interface translate is on
"Options" text of cursor being translated when tooltip translation is
enabled. Now fixed by replacing with `IFACE_`

Pull Request: https://projects.blender.org/blender/blender/pulls/137801
2025-04-22 22:04:55 +02:00
Nicola
e2b9839aea Sculpt: Clay Strips optimizations
This patch introduces some optimizations to Clay Strips, resulting in a
speedup of approximately 1.22x.

- The translations are calculated more efficiently using the local
  space, similar to the approach used for the Plane brush.
- Plane trimming is computed in local space.
- Strength is applied to the offset vector, avoiding an extra per-vertex
  multiplication.
- The local space is constructed such that vertices affected by
  the brush have a positive z-coordinate.

Note: this patch doesn't alter the way the brush works. Any
difference should be considered a bug.

Pull Request: https://projects.blender.org/blender/blender/pulls/137558
2025-04-22 20:49:05 +02:00
Jesse Yurkovich
bc0a9d31e5 Cleanup: USD: Various non-functional cleanups to usd_reader_material
Changes
- `Main` and `NodePlacementContext` are never-null, so use references
  where possible for these types.
- Move the node placement and node caching logic inside the
  NodePlacementContext class itself.
- Remove effectively dead code which checked return value of
  `node_add_static_node` for built-in node types.

Pull Request: https://projects.blender.org/blender/blender/pulls/137797
2025-04-22 20:24:23 +02:00
Miguel Pozo
8b60a65466 Fix #137566: EEVEE: Crash when zooming Blended object in Ortho mode
Use nextafter to prevent infinite loops.

Pull Request: https://projects.blender.org/blender/blender/pulls/137859
2025-04-22 18:49:18 +02:00
Habib Gahbiche
ce5fe6e017 Cleanup: Use Assert in tests to avoid crashes when tests fail
Pull Request: https://projects.blender.org/blender/blender/pulls/137857
2025-04-22 17:59:26 +02:00
Ramon Klauck
12f5ce7c85 VSE: Make mirror operator work in VSE preview
By default, the Ctrl-M shortcut is not working in the VSE preview.

This PR aims to address the issue and provide a working iteration of
the feature.

In my view, it would be preferable for this operator to not only flip
the `flip_x` and `flip_y` values, but also manipulate the transform and
rotation of the strips in a way that keeps the strip in the same
location on the screen, rather than flipping them to the other side.

I decided to implement the feature with this correction functionality,
as it seems more coherent with how the mirror works in other areas of
Blender.

Pull Request: https://projects.blender.org/blender/blender/pulls/136343
2025-04-22 17:28:29 +02:00
Sybren A. Stüvel
b59b4d87a8 Fix #137779: Assigning Action without slot can crash the Dope Sheet
Normally, the dope sheet will not show the directly-assigned Action,
when that Action has no animation data for the data-block.

However, when that data-block uses the NLA, and one or more NLA strips
have an animated property (like their influence), the Action is shown in
the dope sheet for some reason.

This caused the "draw the summary line for this Action" to fail, because
it assumes there must be a slot (because normally when it's drawn, it
implies there is animation data, and thus a slot).

This assumption has been fixed, and the "no slot" case is now handled
properly.

Pull Request: https://projects.blender.org/blender/blender/pulls/137844
2025-04-22 16:47:14 +02:00
Omar Emara
8bb1ebb5f7 Compositor: Turn Keying Screen options to inputs
This patch turns the options of the Keying Screen node into inputs.

Reference #137223.

Pull Request: https://projects.blender.org/blender/blender/pulls/137851
2025-04-22 15:57:46 +02:00
Hans Goudey
685894b665 Cleanup: Use Span argument for KeyBlock conversion function 2025-04-22 09:39:52 -04:00