Commit Graph

122896 Commits

Author SHA1 Message Date
Brecht Van Lommel
514b9f4ec3 Fix: Working space menu shows blank entry with custom OCIO config
If the name of the scene linear space is different in another config, make
sure we update bmain to use that name.

Pull Request: https://projects.blender.org/blender/blender/pulls/145884
2025-09-07 21:32:09 +02:00
Brecht Van Lommel
dc2b672184 Color Management: Add API to get interop ID for working space
This can be useful for exporters to identify known working spaces and write
colorspace metadata to the file rather than convert to another color space.

Pull Request: https://projects.blender.org/blender/blender/pulls/145885
2025-09-07 21:31:14 +02:00
Brecht Van Lommel
9a5ac6d5ec Color Management: Add BLENDER_OCIO environment variable
THis works the same as OCIO, but is Blender specific in case you want to
use a different one than other applications.

Pull Request: https://projects.blender.org/blender/blender/pulls/145882
2025-09-07 21:30:54 +02:00
Brecht Van Lommel
2825f98f80 Fix: Color picker does not refresh properly when changing working space
Clear outdated cached transforms.

Pull Request: https://projects.blender.org/blender/blender/pulls/145878
2025-09-07 18:54:03 +02:00
John Kiril Swenson
b67d44fc70 Fix #145808: Video Editing workspace does not set default tool
When a new workspace is appended into the current file, code tries to
set the active tool. As of #140271, an added check meant that if there
was no sequencer scene yet, no tool would be initialized with
`WM_toolsystem_update_from_context`.

In actuality, the scene and view layer that are passed into this
function are only used by the View3D space in
`WM_toolsystem_mode_from_spacetype`, so we don't need a special case at
all. Just revert to previous behavior to fix.

Pull Request: https://projects.blender.org/blender/blender/pulls/145860
2025-09-07 18:33:11 +02:00
Alaska
ec94e83ffa Cleanup: Fix the misspelling of "collection" in some function names
Pull Request: https://projects.blender.org/blender/blender/pulls/145868
2025-09-07 16:29:21 +02:00
Casey Bianco-Davis
cbdf12d2a9 Curves: Pen Tool
This PR adds the `Pen Tool` to `Curves` objects.
The logic and keybinds are shared with the Grease Pencil `Pen Tool`

Unlike the legacy pen tool, this version can works with multiple objects.

Note: Some changes have been made from the legacy curve object's pen tool.
A list of changes can be found at #142646

Pull Request: https://projects.blender.org/blender/blender/pulls/144833
2025-09-07 16:29:07 +02:00
Pratik Borhade
d40b5dfda3 Fix #145703: Set clamp mode to on by default during vertex slide
Caused by 0bcab8913f
Default value for `use_clamp` is true. But negation in above commit
affected the clamp value. Remove `!`, that way actual property value is
retrieved. Did the same for other two properties as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/145707
2025-09-07 13:23:29 +02:00
Pratik Borhade
cde8517519 Fix #144096: Undo history unknown action on editing curve map
Editing curvemap generates an undo step but with text "unkown action".
This is due to empty name and description on the button. Explictly add
name during button definition, This way `ui_apply_but_undo/ui_apply_but_funcs_after`
uses correct string for undo step.

Pull Request: https://projects.blender.org/blender/blender/pulls/145717
2025-09-07 13:22:15 +02:00
Brecht Van Lommel
2143d495af Color Management: Read and write interop ID for OpenEXR
This is a new feature in the upcoming OpenEXR 3.4.0, but it's a string
attribute that we can already support.

Pull Request: https://projects.blender.org/blender/blender/pulls/145837
2025-09-07 13:20:24 +02:00
Brecht Van Lommel
4a67368ddd Color Management: Assign interop ID to non-color data
This one can not be handled with an alias because it is a role too.

Pull Request: https://projects.blender.org/blender/blender/pulls/145837
2025-09-07 13:20:20 +02:00
Brecht Van Lommel
8ac0a1541b Images: OpenEXR: Write "Software" metadata with Blender name and version
This can be helpful debugging problems with image files.

Pull Request: https://projects.blender.org/blender/blender/pulls/145837
2025-09-07 13:19:00 +02:00
Philipp Oeser
5b6bf4743c Fix #145266: Curves: Radius gets stuck at 0
There are multiple reasons this was not working the same for `Curve` and
`Curves`:

`Curve` is actually setting the `TransData.val` for handles (as opposed
to control points) to `nullptr` (`Curves` doesnt).
This is used in multiple places (and makes sense, since this value is
used for tweaking radius, tilt and GP opacities -- stuff that should not
be able to be tweaked from just handle selection, which was actually
possible...)

Included in the places where this `nullptr` is checked for is the logic
in `initCurveShrinkFatten` which relied on this to spot a selection
including a **control point**.

So this PR fixes these two things (setting nullptr to TransData value
for Curves handles and tweaking the logic in `initCurveShrinkFatten` a
bit so it can handle the different layout/order of `TransData` for
`Curves` vs. `Curve`)

Pull Request: https://projects.blender.org/blender/blender/pulls/145327
2025-09-07 07:40:20 +02:00
Guillermo Venegas
33f2dd978b Cleanup: Nodes: Remove unnecessary temporary string
Unnecessary since more of the API was converted to use StringRef.

Pull Request: https://projects.blender.org/blender/blender/pulls/145211
2025-09-07 03:32:39 +02:00
Campbell Barton
34feb2cefd Fix #145770: UV sync select hides unselected faces
Regression [0] from fix for  #144035 caused the meaning of sync-select
to be flipped in drawing code, causing UV sync select to display
incorrectly in edit-mode.

Resolve by reversing the value returned by `skip_bm_face` as well as
checks in the drawing code.

Co-authored-by: Eitan Traurig <eitant13@gmail.com>

[0]: e02eb13a59
2025-09-07 00:23:29 +00:00
Hans Goudey
83235bebeb Cleanup: Pass StringRef instead of const std::string &
No need to construct a std::string unless we're going to move from it.
2025-09-06 18:29:17 -04:00
Damien Picard
f2b61b0874 UI: Fix and improve a few messages
- "grease pencil" -> "Grease Pencil": title case.
- "Display type" -> "Display Type": title case for property name.
- "Bezier" -> "Bézier": proper noun.
- "Mem:%dM, Peak %dM" -> "Mem:%dM, Peak: %dM": missing colon.
- "cannot save image while rendering" -> "Cannot": Sentence case.
- "Linked data cannot text-space transform" -> "Cannot create
  transform on linked data": rephrase strange sentence.
- "Unsupported object type for text-space transform" -> "... for
  texture space transform": unnecessary abbreviation.
- "Cannot write to asset %s:  %s": remove double space.
- "Failed to set tmpact" -> "temporary action": unclear abbreviation.
- "luminance at which the midetones of the image" -> "midtones: typo.
- "Line angle where the image should be split." -> trailing full stop.
- "... instances all the children in the collection" -> "... instances
  of all the children...": missing "of".
- "Curves to generated rounded corners on" -> "generate": typo.
- "Instances that converted to a point per instance" -> "Instances to
  convert to points": rephrase unclear sentence.
- "Great Pencil to set the depth order of" -> "Grease Pencil": typo.
- "Description to set the smoothness of" -> "Geometry to set the
  smoothness of": typo.
- "A cannot use current file as library" -> "cannot use...": typo.

Pull Request: https://projects.blender.org/blender/blender/pulls/145840
2025-09-07 00:26:31 +02:00
Guillermo Venegas
6f85f3be2e Cleanup: UI: Make some uiLayout members private
This makes child_items_layout_, scale_, align, active_,
active_default_, activate_init_, enabled_, redalert_,
variable_size_, alignment_, emboss_, units_ & search_weight_
private members as follow up from recent UI refactors.

Pull Request: https://projects.blender.org/blender/blender/pulls/145844
2025-09-07 00:26:22 +02:00
Sean Kim
9cae162597 Cleanup: Rename various multires functions
* `multires_reshape_evaluate_limit_at_grid` to
  `multires_reshape_evaluate_base_mesh_limit_at_grid`

Pull Request: https://projects.blender.org/blender/blender/pulls/145457
2025-09-06 23:55:16 +02:00
Casey Bianco-Davis
9f813d0c19 Grease Pencil: Use handles for Extrude, Subdivide and Duplicate
This allows selected handles to work for the `Extrude`, `Subdivide` and
`Duplicate` operators.

Resolves #121574

Pull Request: https://projects.blender.org/blender/blender/pulls/145528
2025-09-06 21:11:18 +02:00
Ray Molenkamp
8c7332cdfb Win: Improve crash reporting
When reporting a crash with unknown exception we just display
UNKNOWN EXCEPTION which is not as helpful as it could be. this
commit adds the actual exception code for all reports.

Also adds a msvc specific exception to the known list for easy
identification.

the exception record from #145762 goes from

ExceptionCode         : UNKNOWN EXCEPTION

to

ExceptionCode         : Microsoft C++ Exception (0xe06d7363)
2025-09-06 09:33:52 -06:00
Campbell Barton
c17f676966 Fix: 3D text line end misses last character
Regression in [0] caused line-end not to select the last character.

[0]: 98fd1a942c
2025-09-06 21:11:13 +10:00
Campbell Barton
5dd70079ad Cleanup: UI_alert, pass const references to strings 2025-09-06 14:29:03 +10:00
Campbell Barton
c69ef385fc Cleanup: use const arguments in BLF funcitons 2025-09-06 14:11:41 +10:00
Campbell Barton
b303d6bb19 BLF: assert alpha doesn't exceed 1.0 for icon outlines
Causes undefined behavior, so the caller needs to clamp.
2025-09-06 13:58:04 +10:00
Campbell Barton
3c7f4edd92 Cleanup: spelling in comments & string
Also back-tick quote literals in CMakeLists files.
2025-09-06 09:27:54 +10:00
Harley Acheson
f7cdd3e867 UI: Preference to Always Show Number Arrows
Numerical inputs have little arrows on the left and right to allow
quick increment/decrement of the value. But these are only shown on
hover, which does not help if using a device that does not have a hover
state (some pens, most touch). This PR adds a user preference to show
them always.

Pull Request: https://projects.blender.org/blender/blender/pulls/145374
2025-09-06 00:12:11 +02:00
Harley Acheson
a9588e46e1 UI: Changes to Animation Playhead Design
This PR changes the animation playhead to make it more recognizable,
have a shape that can be better represented in icons, and to more
easily distinguish it from other indicators like markers.

Pull Request: https://projects.blender.org/blender/blender/pulls/145081
2025-09-05 23:17:07 +02:00
Pablo Vazquez
eae4585177 UI: Accessibility: Reduce Motion
Add "Reduce Motion" option to a new `Accessibility` panel under
Preferences, User Interface.

"Reduce Motion" avoids non-essential animation effects, especially
useful for those experiencing motion sickness/vertigo.

It affects:
* Region open/close.
* Pie menus animation.
* Smooth views.

This panel in the future could host common accessibility settings such
as "Increase Contrast" or font size and weight controls that currently
are part of themes.

See PR for details and screenshots.

Co-authored-by: Harley Acheson <harley.acheson@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/140873
2025-09-05 21:12:52 +02:00
luz paz
1b49b94e0d Cleanup: Fix typos in source/blender/io
Fixes various user-facing and non-user-facing typos.

Pull Request: https://projects.blender.org/blender/blender/pulls/145804
2025-09-05 20:17:28 +02:00
Jesse Yurkovich
3e3ee35e9d Fix #145711: Packed images may fail to export with USD
Certain packed images, like those loaded directly into memory with
`BKE_image_packfiles_from_mem`, would cause USD to process the images as
"in memory" rather than as "packed" because the API was not removing the
IMG_GEN_TILE flag.

Additionally, be sure to use the packed filepath whenever possible
rather than the name given to the Image datablock as this ensures the
correct file names are used inside the USD file and for the resulting
file on disk after export.

This also fixes 2 render tests which now match when compared to the
native renders.

Pull Request: https://projects.blender.org/blender/blender/pulls/145749
2025-09-05 19:41:20 +02:00
Brecht Van Lommel
6a083a5464 Color Management: Add working color space for blend files
* Store scene linear to XYZ conversion matrix in each blend file, along
  with the colorspace name. The matrix is the source of truth. The name
  is currently only used for error logging about unknown color spaces.
* Add Working Space option in color management panel, to change the
  working space for the entire blend file. Changing this will pop up
  a dialog, with a default enabled option to convert all colors in
  the blend file to the new working space. Note this is necessarily only
  an approximation.
* Link and append automatically converts to the color space of the main
  open blend file.
* There is builtin support for Rec.709, Rec.2020 and ACEScg working spaces,
  in addition to the working space of custom OpenColorIO configs.
* Undo of working space for linked datablocks isn't quite correct when going
  to a smaller gamut working space. This can be fixed by reloading the file
  so the linked datablocks are reloaded.

Compatibility with blend files saved with a custom OpenColorIO config
is tricky, as we can not detect this.

* We assume that if the blend file has no information about the scene
  linear color space, it is the default one from the active OCIO config.
  And the same for any blend files linked or appended. This is effectively
  the same behavior as before.
* Now that there is a warning when color spaces are missing, it is more
  likely that a user will notice something is wrong and only save the
  blend file with the correct config active.
* As no automatic working space conversion happens on file load, there is
  an opportunity to correct things by changing the working space with
  "Convert Colors" disabled. This can also be scripted for all blend files
  in a project.

Ref #144911

Pull Request: https://projects.blender.org/blender/blender/pulls/145476
2025-09-05 19:04:47 +02:00
Brecht Van Lommel
a4e9e4869d Refactor: Add foreach_working_space_color to ID type
Left for future work:
* Freestyle modifiers, dynamic paint, legacy texture mapping
* Editor colors: should be changed to sRGB?
* Studio light preferences: also sRGB, though less clear

Pull Request: https://projects.blender.org/blender/blender/pulls/145476
2025-09-05 19:03:32 +02:00
Brecht Van Lommel
b4c3685313 Refactor: Color Management: Add function to change scene linear role
There is a bad const cast here, but seems to work ok in practice. Creating a
whole new config would be tricky, though something we should support in the
future for other reasons.

Pull Request: https://projects.blender.org/blender/blender/pulls/145476
2025-09-05 19:03:24 +02:00
Brecht Van Lommel
099ad9aee6 Refactor: Operator: Support properties dialog with message
Pull Request: https://projects.blender.org/blender/blender/pulls/145476
2025-09-05 19:03:19 +02:00
Aras Pranckevicius
2735176c40 Refactor: VSE, remove STRIP_TYPE_EFFECT, split effect type and blend mode enums
- "Is this strip type an effect?" has been done by reserving 3rd bit
  of the effect enum values to indicate that. That is a very strange
  decision, so make that be done by strip_is_effect() function. The
  enum values have to stay the same for backwards compat however.
- Both "strip type" and "strip blend mode" were sourced from the
  same STRIP_TYPE_ enum, with only parts of the values meant for "type",
  and other parts of values meant for "blend mode". That again is highly
  confusing; split that off into two enums. Yes there's a handful of
  values in them that overlap, but not the majority.

Pull Request: https://projects.blender.org/blender/blender/pulls/145746
2025-09-05 19:00:58 +02:00
Aras Pranckevicius
44b7d7592d ImBuf: multi-thread IMB_byte_from_float / IMB_float_from_byte
Both were largely or completely single threaded.

They are used in various places, but testing their usage in VSE
compositor modifier branch (!139634), applying a default "do nothing"
compositor modifier on a 1080p image (on Ryzen 5950X):
51.4ms -> 12.2ms

Details about IMB_byte_from_float:
- No longer allocate a full new float buffer, instead do all work in
  a local small (32KB size, half of typical L1 cache) job-local buffer.
- Previous code was doing un-premultiply + OCIO + premultiply
  + un-premultiply again. That is pointless; just do
  un-premultiply once.

Details about IMB_float_from_byte / IMB_float_from_byte_ex:
- Remove incorrect code around"allocate float buffer outside of image
  buffer" since it was not actually true to begin with.
- Inside threaded part, do color space conversion and premultiply at
  once per-scanline, so that data stays in CPU caches more.

Pull Request: https://projects.blender.org/blender/blender/pulls/145716
2025-09-05 18:59:18 +02:00
Harley Acheson
68e5851615 UI: Correction & Improvements to File Browser Font Tooltips
The tooltips for fonts in the file browser, while in list view, now
shows either no preview or a blank white square (depending if you
viewed them with thumbnails in the current session). This PR corrects
that to always show a preview. It also shows this preview while in
thumbnail view.

Pull Request: https://projects.blender.org/blender/blender/pulls/145685
2025-09-05 18:41:18 +02:00
Ramon Klauck
b910e04a2a VSE: Implement Lasso Select
This feature works like the select lasso in other editors. In preview
the user can draw a region they want to select and when a strips origin
is in this lasso region the strip gets selected.

In timeline the user can do the same and the strip gets selected when
the strip is in the lasso or some part of the lasso is in the strip.

The tool can be accessed through in the toolbar or via shortcut.

Pull Request: https://projects.blender.org/blender/blender/pulls/143391
2025-09-05 17:53:13 +02:00
Hans Goudey
d939de98a9 Cleanup: Formatting 2025-09-05 11:10:28 -04:00
Guillermo Venegas
7959156876 Cleanup: UI: Make some uiLayout members private
Make root_, context_ , parent_  ,items_ and heading_ uiLayout into
private members. Follow up from recent UI refactors.
Part of: #117604

Pull Request: https://projects.blender.org/blender/blender/pulls/145698
2025-09-05 16:46:42 +02:00
Brecht Van Lommel
a6108f69f2 Fix: MaterialX export can end up with duplicate node names
With chains of nodes with the same name.

Pull Request: https://projects.blender.org/blender/blender/pulls/145800
2025-09-05 16:36:49 +02:00
luz paz
0760b2d5aa Fix typos in source/blender/blenkernel
Fixes various user-facing and non-user-facing typos.

Pull Request: https://projects.blender.org/blender/blender/pulls/145767
2025-09-05 16:25:32 +02:00
luz paz
cfd5cddc41 Cleanup: Fix various typos in source/blender/geometry
Fixes various non-user-facing typos.

Pull Request: https://projects.blender.org/blender/blender/pulls/145794
2025-09-05 16:23:29 +02:00
Hans Goudey
b9ba0a62ca Sculpt: Support compression for multires undo steps
In a simple test with two strokes affecting the majority of a
25 million vertex mesh (multires level 3), I observed a memory
usage decrease from 1.87 GB to 1.51 GB (24% less).

Also includes one simplification to Mesh position restore/swap:
the indices don't change during undo/redo at all, so we don't
need to re-compress the array and store it.

Pull Request: https://projects.blender.org/blender/blender/pulls/145747
2025-09-05 16:04:47 +02:00
Jeroen Bakker
7d3e4a25ac Fix: Vulkan: Unused attachments
Recent changed introduced a VVL error on devices that don't support
`VK_EXT_dynamic_rendering_unused_attachments`. These include
Qualcomm GPUs.

PR introduced regression: !145120

Pull Request: https://projects.blender.org/blender/blender/pulls/145793
2025-09-05 14:32:41 +02:00
Ramon Klauck
7755411c90 VSE: paste strips at mouse in preview
This PR makes it possible to paste strips directly at the mouse in the
VSE Preview, making it faster to paste strips directly at the position
the user wants the strip to be. It is still possible to paste the strip at the
original position with the `ctrl + shift + v` shortcut.

Pull Request: https://projects.blender.org/blender/blender/pulls/145008
2025-09-05 14:32:36 +02:00
W_Cloud
43fdf067ab Geometry Nodes: improve Viewer Attribute Text Readability
- Corner Domain Text Overlap: Text is now offset along the angle bisector of
  each corner. The offset distance is dynamically adjusted based on the view
  zoom and corner angle sharpness.
- Wrap Long Line: Split Vectors, Colors, and Quaternions into labeled line for
  each component.

Pull Request: https://projects.blender.org/blender/blender/pulls/145290
2025-09-05 13:46:03 +02:00
Jeroen Bakker
4f4104d047 EEVEE: Fix pointcloud rendering for Vulkan
When using Vulkan the point clouds were not drawn correctly
in EEVEE. The reason is that only the back faces were drawn.

Pull Request: https://projects.blender.org/blender/blender/pulls/145787
2025-09-05 13:29:15 +02:00
Jacques Lucke
40488038cf Geometry Nodes: optimize group input logging
Previously, group input values were logged for each group input socket. This
means that each value might be logged many times currently when there are many
Group Input nodes.

This patch changes it so that group input values are only logged for a single
socket.  In the provided file from #145385 this speeds up playback performance
from 23 to 39 fps. The next bottleneck there is node editor drawing. If I change
the Geometry Nodes editor to another editor type the speedup is 36 (`main`) to
110 fps (this patch).

Pull Request: https://projects.blender.org/blender/blender/pulls/145781
2025-09-05 13:00:24 +02:00