Commit Graph

150077 Commits

Author SHA1 Message Date
Aras Pranckevicius
9cc97dd42b Cleanup: factor out 4.2 versioning code into versioning_420.cc 2025-05-08 14:52:20 +02:00
Aras Pranckevicius
767cf78dda Cleanup: factor out 4.1 versioning code into versioning_410.cc 2025-05-08 14:52:20 +02:00
Aras Pranckevicius
c8e2dc4fc0 Cleanup: factor out 4.0 versioning code into versioning_400.cc 2025-05-08 14:52:20 +02:00
Aras Pranckevicius
b440b588ac Cleanup: Rename versioning_400.cc -> versioning_450.cc 2025-05-08 14:52:20 +02:00
Jeroen Bakker
7775883da2 Fix #138403: Overlay: Retopology offset not set for Image prepass
Image prepass pass didn't initialize the retopology offset, resulting in
clip test failures on Vulkan. Users noticed that the cycles rendering
didn't update during rendering, only when finihsed.

Pull Request: https://projects.blender.org/blender/blender/pulls/138596
2025-05-08 14:44:39 +02:00
Campbell Barton
302a5541b3 Cleanup: don't assign the native size to the logical size
This size isn't used unless `has_size_logical` is true,
setting fallback values that aren't used is confusing especially since
output rotation isn't applied - unlike the actual logical size.
2025-05-08 12:11:42 +00:00
Campbell Barton
8836d41542 Fix #135764: Crash on startup with mutli-monitors on Gnome Wayland
Rotated outputs caused a workaround for a bug in GNOME to fail.

Also check the native size since the `size_logical` would always
be set to match the `size_native`.
2025-05-08 12:11:40 +00:00
Campbell Barton
f7dc522834 Fix: output rotation checks with WAYLAND
Only 90 & 270 degree transforms were accounted for.
Check for 90 degree rotation using a flag to include
flipped & rotated output transform.
2025-05-08 12:11:39 +00:00
Campbell Barton
702a7a0ba3 Docs: clarify usage of wayland output sizes 2025-05-08 12:11:37 +00:00
Sybren A. Stüvel
23f720da68 Refactor: make bPoseChannel* parameter const in some functions
For some "get … from pose channel" functions, make its `bPoseChannel*`
parameter `const` as it's not being modified.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/138590
2025-05-08 12:07:43 +02:00
Pratik Borhade
9249beb83f Fix: Outliner: Crash renaming GP effect base
Similar to other listbase tree-elements, skip GP_EFFECT_BASE from
renaming. Otherwise it crashes in `str_utf8_copy_max_bytes_impl`
due to assigning some other value to const char stream.

Pull Request: https://projects.blender.org/blender/blender/pulls/138484
2025-05-08 12:04:10 +02:00
Sybren A. Stüvel
27ad6b7c2b Fix #137407: Action properties not usable as driver variable
Add a `PARAMETERS` dependency graph component to Action data-blocks.
This is necessary for drivers to use an Action property as a variable.

Pull Request: https://projects.blender.org/blender/blender/pulls/138495
2025-05-08 10:36:30 +02:00
Jeroen Bakker
db10854e3c Fix #138304: DRAW: Texture wrapper not releasing texture views
When a texture wrapper wraps a second texture it doesn't free its
local resources based on  the previous texture. This resulted in texture
views still being used where the backed memory could already be reused
by other allocations.

In OpenGL this might be solved inside the driver by not freeing the
backed texture unless all views have been freed. However our Vulkan
backend doesn't do this, leading to crashes when resizing the viewport
when displaying a workbench volume. In OpenGL this could lead to small
resizing artifacts, although we haven't noticed them. Overlay also wraps
existing textures.

Pull Request: https://projects.blender.org/blender/blender/pulls/138582
2025-05-08 10:23:28 +02:00
Jacques Lucke
9e0e94e6e2 Nodes: simplify adding new empty node group
The main way to create a new node group right now is to select some nodes and
then press ctrl+G. This works well for the common case when one already has some
nodes to group. However, there is no good alternative currently for when one
wants to create a new group from scratch. A common workaround currently is to
add some dummy node, then press ctrl+G and then to delete the dummy node in the
group again. Obviously, we can do better than that.

This patch adds a `New Group` entry in the menu. It's available in geometry,
compositing and shading Nodes. The operator adds a new node group called
"NodeGroup" (the same default name we use for ctrl+G currently). Then it adds a
new group node and assigns the new group to it. The group itself does not have
any inputs or outputs by default because any such socket would just be a guess
that's likely wrong and more annoying than useful.

A nice side benefit of adding this operator is that the Group menu is not empty
in shading and compositing nodes initially which always looked a bit off.

Pull Request: https://projects.blender.org/blender/blender/pulls/138430
2025-05-08 10:17:56 +02:00
Nathan Vegdahl
4e596d18c1 Fix #138201: Read, write, and copy pose marker custom properties
Custom properties on pose markers in Actions were not handled properly
in the following ways:

- They were not written to or read from blend files, which resulted in
  crashes (reported in #138201).
- They were not duplicated when the pose marker lists were duplicated
  (during Action duplication), which would leave the duplicate marker
  *sharing* custom properties with the marker it was duplicated from.

This PR fixes these issues by creating functions to handle the reading,
writing, and copying of marker lists which properly read/write/copy
custom properties as well, and using those functions in the relevant
places.

Pull Request: https://projects.blender.org/blender/blender/pulls/138494
2025-05-08 10:08:36 +02:00
Philipp Oeser
a5db664d61 Fix #138157: Image Editor Fill tool slight color inaccuracy
`ImagePaintMode` `paint_bucket_fill` does a double colorspace conversion
atm. (which is a lossy process).

Since this is lossy, painting with the same color as was used for
filling can give slight differences (very noticable though if painting
e.g. bump maps).

For comparison, `ProjectionPaintMode` `paint_bucket_fill` (so in the 3D
viewport) does not suffer the same issue (it keeps track of both sRGB
brush color and a linear version of such color).

Currently `paint_2d_bucket_fill` expects linear space color values, so
for filling byte images, we first convert the brush color to linear
(`srgb_to_linearrgb_v3_v3`) then inside `paint_2d_bucket_fill`, we
convert back (`linearrgb_to_srgb_v3_v3`).

We can avoid the double conversion though, make `paint_2d_bucket_fill`
expect sRGB space color values and only convert to linear if we a
filling float images.

Pull Request: https://projects.blender.org/blender/blender/pulls/138540
2025-05-08 08:07:22 +02:00
Philipp Oeser
9afae799e4 Fix #138537: Baking to Color Attribute not possible without UV Map
Caused by f3161149db

Should only check UV maps if we are actually baking to textures
(R_BAKE_TARGET_IMAGE_TEXTURES).

Pull Request: https://projects.blender.org/blender/blender/pulls/138542
2025-05-08 08:06:26 +02:00
Andrej730
670fc012e5 Fix: PyDocs: bpy.ops document behavior on error reports
When submitting #135854 I've assumed that `RuntimeError` is
connected particularly to `{'CANCELLED'}` return status. Turned
out error is raised regardless of what return status is and it's
only based on the presence of error reports during operator
execution. Submitting a clarification for this.

Pull Request: https://projects.blender.org/blender/blender/pulls/138558
2025-05-08 06:58:34 +02:00
Campbell Barton
63cdb7eae4 Cleanup: pass SelectPick_Params by reference instead of pointer
Also use a return value from ED_select_pick_params_from_operator.
2025-05-08 13:50:14 +10:00
Jacques Lucke
3e28dff8db Cleanup: add missing static on functions
This caused some compiler warnings because the functions are not
declared before.
2025-05-08 04:46:22 +02:00
Jacques Lucke
8a42e2b59a Nodes: support expanded menus in node group interface
Previously, menu sockets were always drawn as dropdown. This patch adds the
ability to draw them expanded instead.

As before, in the node editor, only the expanded menu is drawn, without the
label. There is simply not enough space for both. However, in the modifier and
operator settings the label is drawn currently. We'll probably need to add a
separate `Hide Label` option (similar to `Hide Value`) for group inputs that
support it. That would also help a lot with e.g. object sockets.

Pull Request: https://projects.blender.org/blender/blender/pulls/138387
2025-05-08 04:31:09 +02:00
Jacques Lucke
156a405dd5 Nodes: support searching for specific math operations in Add menu
Previously, it was possible to search for specific math operations in
link-drag-search but not in the normal add menu. This patch adds support for
searching for specific operations in various math nodes.

A good trick for adding e.g. a vector add node is to search for `vadd`
(similarly with `iadd`).

The menu itself looks unchanged. This patch only adds additional elements to the
search.

Pull Request: https://projects.blender.org/blender/blender/pulls/138534
2025-05-08 04:28:22 +02:00
Sean Kim
0e8e98016b Cleanup: Remove commented out forward declaration
Also remove unnecessary `enum` prefix

Pull Request: https://projects.blender.org/blender/blender/pulls/138576
2025-05-08 03:41:57 +02:00
Martin-Vignali
9049645d0f FFmpeg: Add support for 10/12 bits FFV1 output
FFV1 supports more than 8 bits by pixel. Add support for 10 and 12 bit
depth (FFV1 encoder uses planar pixel format for these bitdepths).
Fix pixel format for 8 bit output. Previously it was always RGBA.

Co-authored-by: mvji <33432858+mvji@users.noreply.github.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/138192
2025-05-08 02:34:56 +02:00
Harley Acheson
405d9bc0bb UI: Correct Width of Hyper Status Bar
If a keymap entry uses "Hyper" key as a modifier then it currently
shows oddly on the status bar because the text width is narrower than
the button width. This corrects that.

Pull Request: https://projects.blender.org/blender/blender/pulls/138575
2025-05-08 02:01:47 +02:00
Sean Kim
0f10ccd6b5 Fix: Clay Thumb front_angle can be NaN
Introduced in 4c38327ea2

Pull Request: https://projects.blender.org/blender/blender/pulls/138573
2025-05-08 01:10:45 +02:00
Harley Acheson
d2f6514686 UI: Status Bar Proportional Size Include MsPan
Currently while transforming with proportional editing we see an item
in the status bar for "MsPan: Adjust Proportional Influence". This is
actually for trackpad pan gesture (only available on some laptops).
This PR just combines this entry with those for Page Up and Page Down.

Pull Request: https://projects.blender.org/blender/blender/pulls/138574
2025-05-08 00:44:09 +02:00
Hans Goudey
51eab6b25a Cleanup: Use blender::Mutex for file list read job 2025-05-07 18:05:14 -04:00
Hans Goudey
9a5a5c35c7 Cleanup: Use blender::Mutex for image pool 2025-05-07 18:05:14 -04:00
Harley Acheson
48403607dd UI: Status Bar Event Icons for Trackpad Gestures
Adding three icons to represent panning, rotate, and zoom gestures
and using them for status bar event icons for
GHOST_kTrackpadEventScroll, GHOST_kTrackpadEventRotate, and
GHOST_kTrackpadEventMagnify.

Pull Request: https://projects.blender.org/blender/blender/pulls/138569
2025-05-07 23:57:03 +02:00
Guillermo Venegas
a76753ca55 Refactor: UI: Replace uiLayoutRadial with class method uiLayout::menu_pie
This converts the public `uiLayoutRadial` function to an object oriented
API (`uiLayout::menu_pie`), matching the python API.
This reduces the difference between the C++ API with the python version,
its also helps while converting code from python to C++ code (or vice-versa),
making it almost seamless.

`uiLayout::menu_pie` now returns an `uiLayout` reference instead of a pointer.
New calls to this method should use references too.

Part of: #117604

Pull Request: https://projects.blender.org/blender/blender/pulls/138563
2025-05-07 23:29:49 +02:00
Hans Goudey
1fd958fe7c Cleanup: Resolve missing declaration warning 2025-05-07 17:05:31 -04:00
Guillermo Venegas
60fdcb2d20 Cleanup: UI: Follow Using this-> code style in recent uiLayout refactors
This changes removes `this->` when accessing data member with trailing
underscore and adds `this->` to member methods.

Pull Request: https://projects.blender.org/blender/blender/pulls/138564
2025-05-07 22:51:26 +02:00
Jacques Lucke
3a2d4d151f Cleanup: move linear allocator description to class 2025-05-07 20:49:02 +02:00
Jacques Lucke
52a283a1ee Cleanup: fix misleading comment
LinearAllocator does not REallocate, it just allocates a new buffer.
2025-05-07 20:48:26 +02:00
Guillermo Venegas
0a6211a974 Refactor: UI: Replace uiLayoutListBox and uiLayoutOverlap with methods
This converts the public `uiLayoutListBox ` and `uiLayoutOverlap `
functions to an object oriented API (an `uiLayout::list_box` and
`uiLayout::overlap` respectively), following recent uiLayout changes.

Both functions now returns an uiLayout reference instead of a pointer.
New calls to this method should use references too.

Part of: #117604

Pull Request: https://projects.blender.org/blender/blender/pulls/138559
2025-05-07 20:38:40 +02:00
Harley Acheson
1c2aaa8a57 UI: Status Bar Merge Proportional Size Keymap Entries
This PR reduces some space on the Status bar during transforms using
proportional editing by merging TFM_MODAL_PROPSIZE_UP and
TFM_MODAL_PROPSIZE_DOWN items. This also changes the description shown
to "Proportional Size" to match the description in the popover.

Pull Request: https://projects.blender.org/blender/blender/pulls/138458
2025-05-07 19:33:59 +02:00
Hans Goudey
f90e448c6a Cleanup: Use blender::Mutex for various static mutexes
Change almost all `static ThreadMutex` to `static blender::Mutex`.
See b7a1325c3c.

Pull Request: https://projects.blender.org/blender/blender/pulls/138556
2025-05-07 19:32:00 +02:00
Sebastian Parborg
969f95973a Sound: Fix compiling without WITH_AUDASPACE 2025-05-07 18:45:03 +02:00
Sebastian Parborg
16a4a6c5b3 CMake: Add minimum version to TBB.
Since https://projects.blender.org/blender/blender/pulls/138370 we now
require at least tbb 2021.13.0.
2025-05-07 18:24:20 +02:00
Harley Acheson
4e33627ebd UI: Status Bar Page Up/Down Event Icons "P" -> "Pg"
This only changes the status bar display for the Page Up and Down
keymap items to show "Pg↑" and "Pg↓" rather than just "P↑" "P↓". This
also makes the key slightly wider (like "Ctrl"). Will make up for the
width change by collapsing some multiple uses.

Pull Request: https://projects.blender.org/blender/blender/pulls/138554
2025-05-07 18:20:39 +02:00
Hans Goudey
e51d538ee8 Refactor: Move image runtime out of DNA
Like other runtime structs, it doesn't make sense to write this
data to files. And moving it out of DNA to an allocated C++ struct
means we can use other C++ features in it, like the new Mutex
type which I switched to in this commit.

Pull Request: https://projects.blender.org/blender/blender/pulls/138551
2025-05-07 18:01:34 +02:00
YimingWu
518bef9ae9 Fix #138378: Grease Pencil: Correct logic of checking render requirement
`DRW_gpencil_engine_needed` only checks whether grease pencil is
excluded in the viewport or whether there's grease pencil ID exists,
this can not handle cases where grease pencil strokes are generated from
other types of object in geometry nodes. Now this function is split into
two `gpencil_engine_needed_viewport` and
`gpencil_excluded` calls to provide more granulated logic for
places that need them.

Pull Request: https://projects.blender.org/blender/blender/pulls/138386
2025-05-07 17:42:02 +02:00
Mattias Fredriksson
87d04eadd4 Fix: Prevent NURBS .obj importer from setting invalid degree/order
Default behavior in most edit mode operators is to adjust the order
if there is not enough points/knots to support it. If the degree is
incorrectly encoded in the file, import should update it to avoid
generating an invalid  NURBS curve.

Pull Request: https://projects.blender.org/blender/blender/pulls/138374
2025-05-07 17:41:39 +02:00
Hans Goudey
fbb659c4c5 Cleanup: Remove unused TaskPool user_mutex 2025-05-07 11:32:38 -04:00
Miguel Pozo
e231adc371 Revert "Overlay: Skip passes not needed"
This reverts commit c0d6675c84.
The DEG_id_type_any_exists function only takes the original type into
account.

Fix #138548
2025-05-07 17:05:48 +02:00
Guillermo Venegas
a46e3d2e78 Refactor: UI: Replace uiLayoutAbsolute and uiLayoutAbsoluteBlock with uiLayout class methods
This converts the public `uiLayoutAbsolute ` and `uiLayoutAbsoluteBlock`
functions to an object oriented API (an `uiLayout::absolute` and
`uiLayout::absolute_block` respectively), following recent changes.

`uiLayout::absolute` now returns an uiLayout reference instead of a
pointer. New calls to this method should use references too.

Part of: #117604

Pull Request: https://projects.blender.org/blender/blender/pulls/138546
2025-05-07 17:03:15 +02:00
Clément Foucault
b3732f057e Fix #137984: Sculpt mode crash with certain mesh
This was caused by the material indices not referring to an existing
material slot. Clamping the value to the maximum material index for
the given object fixes the issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/138544
2025-05-07 16:46:47 +02:00
Clément Foucault
58d32b482b Fix #138354: GPU: Race condition with SRGB builtin uniform
Multiple threads would be setting the globals
`g_shader_builtin_srgb_transform` and
`g_shader_builtin_srgb_is_dirty`.

These are use for color management inside the builtin
shaders. But the render thread could modify these
values even if its shader have no use of these.

The fix is to move these globals to the `gpu::Context`
class. This way we remove the race condition.
2025-05-07 16:43:42 +02:00
Bastien Montagne
9db53b8dca Add assert regarding consistency of ID type info.
Followup to @e09ccc9b3599c134e/@2b2963e2903, would have prevented the
issue by asserting immediately on Blender startup.

Would love to find a more static way to check that (i.e. error at
compile time), but think it would require quite a few more changes.
2025-05-07 16:40:22 +02:00