Commit Graph

45634 Commits

Author SHA1 Message Date
Germano Cavalcante
015b7483e7 Fix #136061: Shear and Edge Slide not displaying custom keys in statusbar
Since 40eadc75be, `ED_workspace_status_text` is now called at the
beginning of the modal function.

This clears any custom keymap and redraws the status bar.

The `Edge Slide` and `Shear` operations only update the status bar if a
modal key is pressed (not on mouse move).

The solution to avoid losing custom modal keys, and not having to
update the status bar more often is: call `ED_workspace_status_text`
only when an operation that requires redraw is performed.

Pull Request: https://projects.blender.org/blender/blender/pulls/136101
2025-03-18 12:46:56 +01:00
Germano Cavalcante
94a8b5f607 Revert "Fix #136061: Modeling: Always update status bar on shear/edge slide."
This reverts commit b02c83386b.

The problem has not been fully resolved (there is a glitch in the
status bar when changing operations).

A newer, even more efficient solution is on the way.
2025-03-18 08:42:10 -03:00
Campbell Barton
5fc3303a35 Fix assert drawing the knife tool points with the Vulkan backend
Using the knife tool with Vulkan failed because using
GPU_PRIM_POINTS isn't supported with the GPU_SHADER_3D_UNIFORM_COLOR
shader.

Resolve using a shader intended for drawing points.

Ref !136109
2025-03-18 22:36:13 +11:00
Campbell Barton
b77d77af40 Refactor: add utility object & pchan setters, respecting protected flags
Add "set" functions for location, scale & rotation that leave
protected channels untouched.

Ref !136104
2025-03-18 20:36:57 +11:00
Bastien Montagne
b87b58b07e OBJ Export: Update 'bitflag smoothgroup' to also consider boundary vertices.
Previous code would consider two different face groups sharing no common
edges as fully isolated from each other, and could assign them the same
bitflag facegroup value.

Following FBX recent option to export these bitflags smoothgroups (!135646),
also consider that two different face groups are connected if they only share
common vertices, and assign them different bitflags values.

NOTE: This seems to be the expected behavior in major DCCs actually
using smoothgroups, only considering boundary edges create groups that
generate broken shading when imported by these tools.

NOTE: The 'unique integer identifers' option is kept for OBJ exporter,
as such OBJ files are also found on internet, depending on which app
generated them.

Pull Request: https://projects.blender.org/blender/blender/pulls/135998
2025-03-18 10:04:38 +01:00
Jesse Yurkovich
e9a21cf14c Cleanup: USD: various non-functional changes
- Use const in more places
- Use more appropriate headers and forward decls elsewhere
- Remove one instance of variable shadowing
- Rename an internal rna enum list and the USD operator property object
  to follow surrounding code and naming guidelines

Pull Request: https://projects.blender.org/blender/blender/pulls/136112
2025-03-18 07:18:19 +01:00
Philipp Oeser
e22ff684f3 Cleanup: Anim: convert cstyle-casts
Using clang-tidy "cppcoreguidelines-pro-type-cstyle-cast" to find them.

This PR touches `bf_animrig` & `bf_editor_animation` & `bf_editor_armature`

NOTE: Also some case where untouched (not straightforward) same as
expanded macros (e.g. `LISTBASE` or `GS`)
NOTE: a couple of cases of "inconsistent-declaration-parameter" as well

Pull Request: https://projects.blender.org/blender/blender/pulls/136044
2025-03-17 19:49:45 +01:00
Clément Foucault
894c7fa4e2 EEVEE: Remove EEVEE Next mention inside the code
This only changes file and function names.
The EEVEE identifier is still `BLENDER_EEVEE_NEXT`.

No functional changes.
2025-03-17 15:37:04 +01:00
YimingWu
b02c83386b Fix #136061: Modeling: Always update status bar on shear/edge slide.
When a input event is handled but `status.opmodal` is not explicitly
requested, `WM_window_modal_keymap_status_draw` will override the status
bar message, then the tool hint would be incorrect. This applies to
shear and edge slide operators. Seemingly introduced by 6d5d3ce. The
fix is to not ignore mouse move event when updating status bar as they
also causes viewport redraw.

Pull Request: https://projects.blender.org/blender/blender/pulls/136063
2025-03-17 14:29:28 +01:00
Hans Goudey
835696f152 Geometry Nodes: Move import nodes out of experimental
The import nodes are considered complete enough to expose without
the experimental option. This commit removes the option so they will
be exposed in 4.5. There are still some possible future improvements,
including automatic caching, possibly exposing more input sockets,
and possibly including imported paths in the "Internal Dependencies"
panel. Those are considered non blocking though.

Pull Request: https://projects.blender.org/blender/blender/pulls/135957
2025-03-17 13:54:48 +01:00
Clément Foucault
5241133425 UI: Make area border width decoupled from scale factor
This is just the shader change.
It allows more freedom for the UI team to tweak the appearance.

The is not functional changes in this patch.

Rel #126334
2025-03-17 13:12:25 +01:00
Sybren A. Stüvel
7ca64d953c Fix #136041: NLA Strip Influence keyframes not appearing in tweak mode
Fix the `ANIMDATA_FILTER_CASES` macro, so that layered/slotted Actions
no longer take precedence over NLA control curves. Now they're handled
with the same priority as legacy Actions were.

Pull Request: https://projects.blender.org/blender/blender/pulls/136072
2025-03-17 11:47:20 +01:00
Campbell Barton
23de65afab Merge branch 'blender-v4.4-release' 2025-03-17 21:44:29 +11:00
Campbell Barton
044b8ab6f0 Fix #136077: Crash transforming in background mode with an active region
Don't attempt to add region draw callbacks in background mode.
This caused by the regions runtime being null.

Even if the runtime was initialized, drawing callbacks aren't needed
in background mode.

Ref !136078
2025-03-17 21:41:34 +11:00
Sybren A. Stüvel
4e33abdafe Merge remote-tracking branch 'origin/blender-v4.4-release' 2025-03-17 11:29:24 +01:00
Christoph Lendenfeld
103826d7ab Fix: Add missing reports when running Merge/Separate Action operators
Add reports after the merge- and separate animation operators are run.
This helps to clarify that these are limited in their use with the
NLA.

The motivation for this comes from a [comment][1] on a different
issue.

[1]: https://projects.blender.org/blender/blender/issues/135894#issuecomment-1520306

Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/135920
2025-03-17 11:26:43 +01:00
Campbell Barton
3285da11a9 Fix #136067: Crash with dynamic paint output toggle in some contexts
Resolve the crash by using the active-object to match the operators
poll functions.

Ref !136068
2025-03-17 21:17:48 +11:00
Campbell Barton
070a4cc9ee Merge branch 'blender-v4.4-release' 2025-03-17 20:14:50 +11:00
Campbell Barton
c8c276f56f Fix #136059: Crash clicking on the marker-region in the time line
When a marker exists always return the nearest instead of using an
arbitrary large threshold which caused region_position_is_over_marker to
crash when a non-empty marker list returned a null nearest marker.

Ref !136060
2025-03-17 20:13:08 +11:00
Pratik Borhade
72a38aee7e UI: Increase default rows of tree view
Tree view UI of bone collection, node interface and light linking is
quite small right now. Bump the minimum row count similar to
6d8e642367

Pull Request: https://projects.blender.org/blender/blender/pulls/135426
2025-03-16 06:44:36 +01:00
Philipp Oeser
1448b70625 Fix #135964: "Add Paint Slot" disabled "Alpha" still adds alpha
Since internally `BKE_image_add_generated` uses 4 channel colors (no
matter what depth/planes is specified), just set alpha to 1 if the
option is unchecked.

Same as what 35dd09a9ef did for `IMAGE_OT_new`

Pull Request: https://projects.blender.org/blender/blender/pulls/135972
2025-03-15 08:54:13 +01:00
Campbell Barton
2c6b23e513 Merge branch 'blender-v4.4-release' 2025-03-15 15:26:15 +11:00
Campbell Barton
8faf210e4e Fix: crash duplicating empty hair
Attempt to access `points_by_curve.data().last()` on an empty array
crashed on a null pointer dereference.

Ref !135956
2025-03-15 15:18:03 +11:00
Ramón Klauck
dde6c2bb10 Fix: VSE: Incorrect rotation with mirrored images
When images in the VSE use mirror and then get rotated, they rotate in
the wrong direction.

Multiply rotation by X and Y component of mirror value (-1). This is
the same approach as used by translation.

Co-authored-by: Aradgus <ramonklauck987@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/136004
2025-03-15 02:32:04 +01:00
Harley Acheson
18d82c5164 Fix #135970: Allow Allow Movement After Tooltip Timer Starts
We can only allow some mouse and pen movement once the tooltip timer
has started. Doing so beforehand can keep some tooltips from starting.

Pull Request: https://projects.blender.org/blender/blender/pulls/135997
2025-03-14 19:16:43 +01:00
Julian Eisel
4499fad40e UI: Horizontal list view for asset browser
Part of #134755 / #134766.

The asset browser currently lacks a compact view that leaves names
readable. Especially when managing asset libraries (e.g. to prepare it
for sharing or set up a production library), this is quite a usability
issue. A column view like the file browser has can solve this, allowing
a quick overview and fast browsing of libraries, while keeping names
readable.

Adds a new "Horizontal List" display mode to the asset browser that
distributes assets over multiple columns, with horizontal scrolling.
Asset previews are shown in this mode, plus an asset type icon if
there's enough space. The size of previews and the columns can be
configured next to the display mode, for optimizing the display.

Pull Request: https://projects.blender.org/blender/blender/pulls/135306
2025-03-14 16:43:12 +01:00
Julian Eisel
95c2daaac7 Cleanup: Move 3D View dropbox code into own file
There was quite a bit of drop-box code in `space_view3d.cc`. Moving it
to an own file makes files more focused & coherent, and keeps file sizes
more manageable.
2025-03-14 15:14:42 +01:00
Pratik Borhade
f5ceb3822a Grease Pencil: Stroke split operator
An operator to split selected points into a separate stroke.
Use `split_points()` function implemented in 2c42294557

Resolves #113643

Pull Request: https://projects.blender.org/blender/blender/pulls/135845
2025-03-14 12:37:25 +01:00
Habib Gahbiche
d8d09cdadb Geometry Nodes: shortcuts for viewer nodes
Implement shortcuts for viewer nodes. Viewer nodes are now activated using the operator `bpy.ops.node.activate_viewer()` instead of activating the viewer by setting the node to active.

This also unifies the behavior with viewer shortcuts in the compositor (see attachment in the original PR).

Pull Request: https://projects.blender.org/blender/blender/pulls/134555
2025-03-14 11:26:57 +01:00
Sean Kim
fed2364d18 Fix #135931: Paint brush with gravity factor can crash Blender
This commit prevents the "Gravity" value from having an effect on
brushes that are based on either the Paint or Smear brush in addition to
the ones that are already filtered. Prior versions of blender don't
crash, but still deformed the mesh, which is unexpected & undesired.

Pull Request: https://projects.blender.org/blender/blender/pulls/135944
2025-03-13 20:51:24 -07:00
Sean Kim
07e8b39330 Fix #135931: Paint brush with gravity factor can crash Blender
This commit prevents the "Gravity" value from having an effect on
brushes that are based on either the Paint or Smear brush in addition to
the ones that are already filtered. Prior versions of blender don't
crash, but still deformed the mesh, which is unexpected & undesired.

Pull Request: https://projects.blender.org/blender/blender/pulls/135944
2025-03-14 04:48:41 +01:00
Harley Acheson
edf2706f8c UI: Improve Usage of Tooltips for Pen Users
Hovering over UI items will pop up a tooltip hint if you are perfectly
still. This is easy when using a mouse since it is resting on a
surface. But with a tablet pen you are holding it off the surface so
absolute stillness is difficult. This PR allow a small amount of
movement. So unsteady or slow movement will still pop up the hint.

Pull Request: https://projects.blender.org/blender/blender/pulls/135602
2025-03-13 23:35:40 +01:00
Harley Acheson
8c5393d4c0 Fix #94324: Longer Drag Threshold for Pens on Tool Icons
Toolbar items with variations open a menu on long press. But they will
also open immediately on drag. The amount of distance it considers a
drag is about two pixels. Tablet pen users generally move more than
that while selecting items so the menu almost always pops out. This PR
uses the correct drag distance per pointer type, and uses the position
of the start of the drag instead of the last reported position.

Pull Request: https://projects.blender.org/blender/blender/pulls/135677
2025-03-13 23:10:47 +01:00
Guillermo Venegas
4245f1320e Fix #135742: Avoid unespecified font style for side panel categories text draw
Apply widget style to avoid drawing with the incorrect text size or
weight for side panel categories.

Pull Request: https://projects.blender.org/blender/blender/pulls/135824
2025-03-13 21:44:23 +01:00
Sean Kim
7ea75dccc2 Cleanup: Remove OBEDIT_FROM_OBACT usage in info_stats.cc
Pull Request: https://projects.blender.org/blender/blender/pulls/135812
2025-03-13 15:59:15 +01:00
Julian Eisel
1ca05d3940 UI: Fix double padding in file browser drawing
Paddings were applied a bit oddly, resulting in a double padding for the
drawing. Each "tile" (the space to draw the file in) already had a padding
applied (`FileLayout.tile_border_x`), we'd apply another one to it. This second
padding should only be used for spacing of individual items *inside* the tile.

Code makes more sense too now, there are fewer arbitrary/eyeballed numbers to
make things "look good".

Pull Request: https://projects.blender.org/blender/blender/pulls/135915
2025-03-13 13:14:53 +01:00
Sybren A. Stüvel
565377b8f1 Merge remote-tracking branch 'origin/blender-v4.4-release' 2025-03-13 11:27:13 +01:00
Sybren A. Stüvel
1d20304442 Fix #135894: after "Merge Animation" animation does not play properly
The "Merge Animation" operator now properly tags the affected Actions
with `ID_RECALC_ANIMATION_NO_FLUSH` so that new 'evaluated copies' are
created. Because this was missing, the animation evaluation code didn't
see the moved channelbags yet, which caused animation playback to be
broken.

Pull Request: https://projects.blender.org/blender/blender/pulls/135906
2025-03-13 11:26:42 +01:00
Campbell Barton
ff8baa6791 Cleanup: pass BMUVOffsets by const reference 2025-03-13 17:06:32 +11:00
Campbell Barton
78c3f6a1ee Cleanup: adjust order of terms for BMesh UV map function calls
Order more generic terms first for better ordering, more useful
completion.
2025-03-13 15:23:46 +11:00
Campbell Barton
6ec1bc669e UV: correct checks for no-selection
There is no need to check "Sync Selection" as the check for no selected
vertices is also valid when sync-selection is disabled.
2025-03-13 14:57:10 +11:00
Campbell Barton
571bab615c UV: skip adding UV data layers when sync-select is used
When sync select is enabled, the data layers aren't accessed
so there is no need to add them.

Also skip adding a "pin" layer when clearing pinned UV's.
2025-03-13 14:40:56 +11:00
Campbell Barton
4a8e50e5de UI: show an error when rip is attempted with sync select
This was failing with an unhelpful error.
2025-03-13 13:50:16 +11:00
Campbell Barton
6ef7dae8ef Cleanup: spelling in comments (make check_spelling_*) 2025-03-13 13:41:17 +11:00
Harley Acheson
9dbd20b369 UI: Hide NLA Scrollbars When Very Short
With commit f40cd831fd we are hiding scrollbars when timeline and many
other editors are sized to be very short. This PR just does the same
for NLE.

Pull Request: https://projects.blender.org/blender/blender/pulls/135834
2025-03-13 01:27:12 +01:00
Pratik Borhade
a0fdbf0fd2 UI: Include obdata in material properties context path
Context path in the header of material properties tab always indicates
material is on object. Include object.data in context path when material
is on mesh for example.

Pull Request: https://projects.blender.org/blender/blender/pulls/134968
2025-03-12 23:09:58 +01:00
Brecht Van Lommel
dc488b99a5 Merge branch 'blender-v4.4-release' 2025-03-12 13:39:50 +01:00
Brecht Van Lommel
92f2027f62 Fix #135806: Wrong error message on render to directory without permission
Make MOV_write_begin always report an error on failure, and remove the
generic one from the caller.

Regression from 974efe7d23.

Pull Request: https://projects.blender.org/blender/blender/pulls/135859
2025-03-12 13:39:00 +01:00
Campbell Barton
848cf35495 Cleanup: avoid the "toggle" case being handled twice in UV select all
Harmless but unnecessary.
2025-03-12 22:23:34 +11:00
John Kiril Swenson
7356e72e1b VSE: Snap to Frame Range, Snap by Default
This patch adds the ability to snap to the frame range bounds in the VSE
timeline, on by default. End frame snap location is offset by 1 to
ensure the snap point aligns with the visible end frame boundary
(otherwise e.g. right handle of strip would be one frame short).

Timeline and preview snapping is also turned on by default using the
same versioning block.

Pull Request: https://projects.blender.org/blender/blender/pulls/135753
2025-03-12 03:36:32 +01:00