Commit Graph

120055 Commits

Author SHA1 Message Date
Campbell Barton
2ef03e08b3 WM: warn when file selector properties don't match expected types 2025-04-25 10:53:20 +10:00
Campbell Barton
0314f9318c Docs: move WindowManager.fileselect_add descriptions into an example
- Allow for formatting and expanded descriptions.
- Clarify the expected types of each property.
2025-04-25 10:18:36 +10:00
Campbell Barton
2d4290f285 Cleanup: spelling in comments (make check_spelling_*)
Also inconsistent capitalization.
2025-04-24 22:45:22 +00:00
Harley Acheson
4856cfa89c Fix #137940: Wider Text Caret for Text Object Editing
While editing text objects a vertical bar is used as a text caret to
indicate the current cursor position within the string. This is drawn
by the overlay engine with a specific shader that changes size with the
object. Unfortunately this is currently too narrow and will become
subpixel and not display while the text is still readable. This PR just
increases the text caret width so that it is still visible at very
small sizes.

Pull Request: https://projects.blender.org/blender/blender/pulls/137975
2025-04-25 00:13:44 +02:00
Jonas Holzman
19fe66c940 Cleanup: Wandering semicolon in screen_ops.cc 2025-04-24 23:58:53 +02:00
Harley Acheson
587a7f877c UI: Path Line Breaking Characters
This PR adds more line breaking opportunities when breaking file paths.
This adds ".-%?&". Some, like "." are moved to the subsequent line, to
keep period with the extension.

Pull Request: https://projects.blender.org/blender/blender/pulls/137972
2025-04-24 22:23:22 +02:00
Harley Acheson
9dd4e90136 UI: Line Break on Conditional Punctuation
This PR adds new typographical line breaking opportunities, characters
that break depending on what follows. For example comma if not followed
by a space or a number. Period if not followed by a space or another
period. Along with related non-Latin equivalents, like Greek question
mark, full width punctuation, Hebrew, Arabic, etc.

Pull Request: https://projects.blender.org/blender/blender/pulls/137934
2025-04-24 20:42:32 +02:00
Hans Goudey
eb2ce222f5 Fix: Convert attribute operator can change active attribute
Part of #137964.
2025-04-24 14:30:53 -04:00
Pablo Vazquez
f4c31b75ba UI: Rename "Tris to Quads" to "Triangles to Quads"
Rename the operator label to `Triangles to Quads`. This way, when
searching it will show up both when looking for `Triangles` or `Tris`.
Instead of having to always search for `Tris` which is less intuitive.

This also matches the manual, which has been calling this operator
`Triangles to Quads` for several years now.

This does not rename any API or operator name.
2025-04-24 19:00:48 +02:00
Julian Eisel
a8b031dcc6 UI: Use two lines for Asset/File Browser file names under previews
Part of #134755 / #134766

Makes asset and file browser use up to two lines to display the name of the asset or file under
preview images. Lines are wrapped using our existing wrapping algorithm at characters like spaces,
hyphens, under-scores, etc.

This leads to much less information loss because of clipped labels in common cases. When displaying
assets or files as previews the labels would become rather useless in many cases. Especially with
smaller preview sizes.

When there's still not enough space to display the full asset or file name, the second line is
truncated in the middle, leaving the beginning, and some of the end of the label visible. This
produced best results in testing.

Pull Request: https://projects.blender.org/blender/blender/pulls/136907
2025-04-24 18:03:26 +02:00
Christoph Lendenfeld
9663d287fc Anim: merge keyframe jump operators
This merges the `GRAPH_OT_keyframe_jump` operator into the more generic
`SCREEN_OT_keyframe_jump` operator. (the former introduced with #108549)

The functionality of both operators is retained by running
a `switch/case` based on the editor type.
Doing so, we can filter out the Dope Sheet as well which fixes #93944
The `GRAPH_OT_keyframe_jump` is preserved, but when it is called,
it generates a warning stating it should not be used anymore.
It then calls directly into the `SCREEN_OT_keyframe_jump` to
ensure functionality doesn't drift apart.

Fixes #136176
Fixes #93944

Pull Request: https://projects.blender.org/blender/blender/pulls/137542
2025-04-24 18:01:05 +02:00
Julian Eisel
dd3f2ef36b Fix #137939: Collection Exporter properties no longer respond to Undo
The collection exporter UI template uses operator property drawing to
add buttons in the Properties editor. It creates a sort of mock operator
to be able to do that.

This isn't something we usually do. In all other cases where operator
properties are drawn, we don't want them to send undo pushes. Think it's
fine to make that an option of the template. It's opt in though, since
it's an unusual need.
2025-04-24 17:51:24 +02:00
Guillermo Venegas
9887f2290e Refactor: UI: Rename uiItem properties with trailing underscore
This adds a trailing underscore to uiItem member variables
to distinguish them as private.

Continuation of 7002f16992

Pull Request: https://projects.blender.org/blender/blender/pulls/137914
2025-04-24 17:22:28 +02:00
Brecht Van Lommel
a00885666b Fix #98339: Spreadsheet does not immediately report mesh subdiv info
Pull Request: https://projects.blender.org/blender/blender/pulls/137959
2025-04-24 16:07:52 +02:00
Brecht Van Lommel
e21924d0ff Cleanup: Fix kdtree node warnings with GCC
Alternative fix to 50023eab75.

Pull Request: https://projects.blender.org/blender/blender/pulls/137962
2025-04-24 16:00:44 +02:00
Brecht Van Lommel
b23aaa4641 Fix #137821: Crash with grease pencil render, compositor and render region
When using the compositor, the parent scene overrides the render resolution
and region of the child scene. Unlike workbench and EEVEE, the grease pencil
engine was reading this information from the child scene.

Pull Request: https://projects.blender.org/blender/blender/pulls/137923
2025-04-24 16:00:10 +02:00
Brecht Van Lommel
3ee7750fe1 Fix #137869, #105665, #98339: Wrong or delayed mesh subdivision stats
* Fix CPU subdivided meshes not being counted
* Fix wrong check for GPU subdivision
* Draw status bar last so stats reflect latest 3D viewport drawing

Pull Request: https://projects.blender.org/blender/blender/pulls/137959
2025-04-24 15:59:58 +02:00
Clément Foucault
84210efde8 Fix: Vulkan: Avoid warning about enum value not handled in switch 2025-04-24 15:53:21 +02:00
Clément Foucault
551b659c6f Fix: Overlay: Shader error because of implicit cast 2025-04-24 15:52:38 +02:00
Clément Foucault
438f8930cc Fix #137958: Overlay: Lines are too thick
Caused by b8f591c348.
The copy pasted code was not the same everywere.
Invert the result only for the grid shader as it
used to be.
2025-04-24 15:20:33 +02:00
Hans Goudey
0f72fffac3 UI: Clarify Boolean solver descriptions/names and make consistent
Use the same solver names and descriptions for the geometry node,
the modifier, the sculpt trim tool, and the edit mesh intersect operator.
Also clarify the descriptions, some of which used to say that the float
solver had the best performance which isn't true anymore.

Pull Request: https://projects.blender.org/blender/blender/pulls/137922
2025-04-24 15:06:26 +02:00
Clément Foucault
06e642a9a1 Fix: Overlay: Broken shader compilation due to implicit cast 2025-04-24 14:58:37 +02:00
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
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
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
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
Aaron Carlisle
f8c40617ac Cleanup: Return early instead of goto to end of function 2025-04-23 23:05:04 -04: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
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
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