Commit Graph

119213 Commits

Author SHA1 Message Date
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
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
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
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
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
Miguel Pozo
4e13fd4712 Fix #137560: Overlay: Mesh visibility mismatch
Skip prepass if depth is available.

Pull Request: https://projects.blender.org/blender/blender/pulls/137826
2025-04-22 15:09:14 +02:00
Miguel Pozo
f933282ed5 Fix #137514: EEVEE: Holdout objects still emit radiance
Disable radiance for holdout objects.

Pull Request: https://projects.blender.org/blender/blender/pulls/137824
2025-04-22 15:07:02 +02:00
Habib Gahbiche
49c284fe87 UI: Compositor: Activate viewer node when icon is clicked
Currently, clicking on the viewer icon in the compositor has no effect,
whereas in geometry nodes it activate or deactivates the viewer.

The compositor requires exactly one viewer to be active. So pressing the
icon when the viewer is already active has no effect

Pull Request: https://projects.blender.org/blender/blender/pulls/137840
2025-04-22 14:56:21 +02:00
Omar Emara
730cb40f4c Compositor: Turn Color Spill options to inputs
This patch turns the options of the Color Spill node into inputs.

In the process, the Ratio option was renamed to Limit Strength, the
unspill option was renamed to Spill Strength.

Reference #137223.

Pull Request: https://projects.blender.org/blender/blender/pulls/137848
2025-04-22 14:51:26 +02:00
Brecht Van Lommel
50023eab75 Fix: Invalid kdtree node allocation after recent refactor
Address the root cause and fix one definition rule violation.
Broken by fb2ba20b67.

Pull Request: https://projects.blender.org/blender/blender/pulls/137845
2025-04-22 14:32:39 +02:00
Campbell Barton
9de0aa1066 Fix: #133486: 'use_region_toggle_pie' AssertionError in MovieClipEditor 2025-04-22 11:25:14 +00:00
Philipp Oeser
b40760caf8 Fix #137610: Motion Paths don't auto-update
Caused by 43d7558e5b

So for new layered actions, we need to get the list of FCurves in a
different way (via Channelbag).

Pull Request: https://projects.blender.org/blender/blender/pulls/137653
2025-04-22 12:30:42 +02:00
Colin Marmond
95659c0bfb Shader: Use experimental node previews only for material trees
Restrict the node previews to only material node-trees which are the only
supported for now.

Pull Request: https://projects.blender.org/blender/blender/pulls/137836
2025-04-22 11:28:25 +02:00
Brecht Van Lommel
fb2ba20b67 Refactor: Use more typed MEM_calloc<> and MEM_malloc<>
Pull Request: https://projects.blender.org/blender/blender/pulls/137822
2025-04-22 11:22:18 +02:00
Pratik Borhade
bf7c53bd57 Fix #137825: Grease Pencil: Orbit around selection fails in paint mode
Wrong origin was calculated when inside paint mode. Use
`BKE_paint_stroke_get_average` for correct pivot point in grease pencil
modes.

Pull Request: https://projects.blender.org/blender/blender/pulls/137831
2025-04-22 11:20:52 +02:00
Nathan Vegdahl
b69a4380b6 Fix: non-trivial memcpy compiler warnings on animrig copy constructors
The copy constructors for `animrig::Strip`, `animrig::Slot`, and
`animrig::StripKeyframeData` used a `memcpy` call as part of the copy
implementation. However, this produced warnings on clang 20.  For example:

```
warning: first argument in call to 'memcpy' is a pointer to
non-trivially copyable type 'blender::animrig::Strip'
[-Wnontrivial-memcall]`
```

These warnings did not reflect any actual bugs, because the underlying DNA
structs that those types wrap are in fact trivial. Nevertheless, it's worth
fixing the warnings.

This fixes the warnings by replacing the uses of `memcpy` with equivalents that
amount to a `memcpy` anyway, but which the compiler understands are valid for
the types.

There was also one additional use of `memcpy` in `Strip::create()` that did not
trigger a warning because it operated directly on the underlying DNA struct, but
was also unnecessary. This PR also replaces that with a simple assignment.

Pull Request: https://projects.blender.org/blender/blender/pulls/137467
2025-04-22 10:42:20 +02:00