Commit Graph

150077 Commits

Author SHA1 Message Date
Campbell Barton
f09ca4d807 Fix #137940: 3D text cursor displays intermittently when zoomed out
Draw a wire quad along with the filled quad to ensure it's never
less than a pixel width wide.
2025-04-25 11:23:23 +10:00
Campbell Barton
b096066da5 Revert "Fix #137940: Wider Text Caret for Text Object Editing"
This reverts commit 4856cfa89c.

The change only slightly mitigated the issue, revert in favor
of an alternative fix.
2025-04-25 01:23:13 +00:00
Campbell Barton
2ef03e08b3 WM: warn when file selector properties don't match expected types 2025-04-25 10:53:20 +10:00
Campbell Barton
575600d540 Docs: correct use of FILE_PATH for directories
Also correct own error in recent doc-update regarding the expected
return value for fileselect_add.
2025-04-25 10:27:30 +10:00
Campbell Barton
5e61fbe1c1 Cleanup: correct subtype for extensions operators
Use DIR_PATH for directories.
2025-04-25 10:25:42 +10:00
Andrej730
e9c0029316 Docs: add the WindowManager.fileselect_add check_existing property
Ref: !137416
2025-04-25 10:20:08 +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
Campbell Barton
500509a789 check_spelling: allow variables with an 'th suffix (for indices) 2025-04-25 08:37:11 +10: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
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