Commit Graph

121949 Commits

Author SHA1 Message Date
Yahia
a37157f12b UI: Changed the UI text from "Click Drag" to "Drag"
Address change proposed in #131899.

Ref !131985
2025-07-31 00:12:52 +10:00
Jacques Lucke
6cd1c5c031 Fix: missing main invariants update after append
This could result in a crash before when appending a data-block that was already linked before.

Pull Request: https://projects.blender.org/blender/blender/pulls/143606
2025-07-30 15:41:40 +02:00
Jacques Lucke
76a861ab41 Geometry Nodes: move more menu inputs to sockets
This is a continuation of #140705. It changes more menu node options to be input
sockets. It also changes the order of the input sockets in a few cases to make
the node look a bit better.

Forward and backward compatibility is preserved.

Pull Request: https://projects.blender.org/blender/blender/pulls/142220
2025-07-30 15:32:10 +02:00
Miguel Pozo
4a87a7e290 Fix #142800: Broken selection with Clipping Regions
Add missing DRW_CLIPPING_UBO_SLOT UBO.

(4.5 backport candidate)

Pull Request: https://projects.blender.org/blender/blender/pulls/143493
2025-07-30 15:23:38 +02:00
Campbell Barton
4d6af81b58 Fix #143629: Tool gizmo disappears when resizing areas & regions
After resizing screen data an additional redraw is needed so gizmos
are refreshed without `G_TRANSFORM_WM` being set which causes some
gizmos not to display.
2025-07-30 23:21:51 +10:00
Brecht Van Lommel
e82dab28b8 Fix #143148: Attribute shader node no longer finds custom property
This code was not meant to be changed to system ID properties, it was
explicitly looking for custom properties before resolving the RNA path.

There are tests for this functionality, but because the versioning copies
the ID properties to the system ID Properties, it worked for existing
properties but not newly created ones.

Pull Request: https://projects.blender.org/blender/blender/pulls/143574
2025-07-30 14:30:56 +02:00
Falk David
d6b1805e2c Fix: Grease Pencil: Remove fill guide attribute in remove_fill_guides
When using the "Remove Fill Guides" operator, it deleted the strokes
that were used as fill guides, but it didn't remove the attribute
afterwards.
2025-07-30 13:38:45 +02:00
Habib Gahbiche
5783c600dc Fix: wrong user count for compositing node tree
**How to reproduce:**
1. Assign a node tree to the scene compositing node group in Python
2. Notice how the node tree has the wrong user count

Example:
```python
C.scene.compositing_node_group = \
    D.node_groups.new("ntree", "CompositorNodeTree")
print(C.scene.compositing_node_group.users) # returns 0
```

Pull Request: https://projects.blender.org/blender/blender/pulls/143577
2025-07-30 13:18:47 +02:00
Bastien Montagne
23e03be72d Fix #143600: Library overrides on custom properties are broken.
Mistake in 7276b2009a, where iterator over StructRNA properties was
changed to iterate over the new system IDProps, instead of the existing
(now 'custom data'-only) user IDProps.

System IDProps do not need to be handled in this iterator, as they are
expected to already be processed through their wrapping RNA properties.
2025-07-30 12:44:20 +02:00
Pratik Borhade
3f338f923d Shape Key: Move multiple selected elements
Similar to !141881, add support to move selected elements in the list
Now basis shape key is fixed at the first location. It cannot be moved
up/down. Other keys cannot be moved either above shape key.

Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/141930
2025-07-30 11:42:37 +02:00
Pratik Borhade
3bfd4c83f6 Core: Rename ID name and plural_name for annotations
This resolves a bug #143101 caused by 20383e4d82
`outliner_idcode_to_plural` fails to find correcty idtype with old
plural name. Fix this so it matches with `MainCollectionDef`.

Pull Request: https://projects.blender.org/blender/blender/pulls/143179
2025-07-30 11:41:44 +02:00
Aras Pranckevicius
cf27df45f8 Cleanup: Add enum types around various VSE DNA enums
- In various VSE related DNA structs, indicate which enums they use
  as comments,
- Add enum types for the enums that were untyped,
- Move Wipe effect enums to DNA header for clarity, since they are
  serialized values,
- Reduce SeqRetimingKey size from 40 bytes to 32 bytes; there
  was too much unnecessary padding.
- Rename some enums SEQUENCE_ -> STRIP_ where relevant.
- Rename wipe enums DO_MEOW_WIPE -> SEQ_WIPE_MEOW

Pull Request: https://projects.blender.org/blender/blender/pulls/143565
2025-07-30 11:00:19 +02:00
Guillermo Venegas
0cc1c212a8 Cleanup: UI: Remove public access to uiItem::type_
Follow up from recent UI refactors.
Part of: #117604

Pull Request: https://projects.blender.org/blender/blender/pulls/143324
2025-07-30 07:17:00 +02:00
Campbell Barton
f281f5a500 Cleanup: header grouping
Group includes, this is mostly being done already but had become mixed
up in some areas.
2025-07-30 14:22:06 +10:00
Campbell Barton
d13540fe7d Cleanup: rename locked interface setting functions
Follow the convention of using terms such as get/set as a suffix.
2025-07-30 13:01:43 +10:00
YimingWu
46bd73f967 Fix #143360: Separate geometry flags RNA access from weight proximity modifier
In vertex weight proximity modifier, `proximity_geometry` shares the
same DNA variable as `proximity_flags`, which brings interference when
setting these two properties at the same time. Now separated
`proximity_geometry` access in RNA with a separated set function so it
only changes the relevant flags.

Pull Request: https://projects.blender.org/blender/blender/pulls/143405
2025-07-30 02:27:04 +02:00
Campbell Barton
61fe1f09e0 Cleanup: quiet compiler warnings
Also remove operation check in `file_os_operations_menu_item` since a
zero value is never passed in.
2025-07-30 10:10:44 +10:00
Harley Acheson
fcc434d60e Fix #134231: Allow Use of Shortcuts to External Operation Items
Right-clicking on a File Browser item shows a context menu that
(usually) includes a submenu "External". The items on that work
correctly when selected from the menu, but will not work correctly if
you create a keyboard shortcut directly to the item. This PR removes
the use of a filepath property on these, instead having each operate
on the currently-selected File Browser item.

Pull Request: https://projects.blender.org/blender/blender/pulls/134819
2025-07-30 00:13:00 +02:00
Sean Kim
4858e8e1bc Cleanup: Use enum class for PlaneAABBIsect
Pull Request: https://projects.blender.org/blender/blender/pulls/143586
2025-07-30 00:03:23 +02:00
Sean Kim
0e19a40e3a Cleanup: Rename internal Paint BVH node_tree struct 2025-07-30 00:03:16 +02:00
Harley Acheson
e154175a90 UI: Fade In Some Area Maintenance Overlays
This adds a slight ease-in fade in to the start of some area
maintenance operations. Fade in the highlighting of join areas, docking
targets, closed areas, etc.

Pull Request: https://projects.blender.org/blender/blender/pulls/140319
2025-07-29 23:36:05 +02:00
Harley Acheson
37a11ad824 UI: Shrink/Fatten Status Bar Display
This PR moves all keymap information for the mesh Shrink/Fatten
operator to the status bar and only the values on the area header.

Pull Request: https://projects.blender.org/blender/blender/pulls/141957
2025-07-29 22:59:46 +02:00
Harley Acheson
a08aabc9ee UI: Mesh Shear Status Bar Display Improvements
This PR adds some missing keymap items to the status bar display for
the mesh Shear operator. Adds snapping, precision, and proportional
editing size (when applicable).

Pull Request: https://projects.blender.org/blender/blender/pulls/141975
2025-07-29 22:39:41 +02:00
Harley Acheson
8ba44fe799 UI: Change "Full Screen Area" to "Focus Mode"
Areas can be made to take up more space in two different ways. One we
call "Maximize Area" that just takes up the rest of non-global space,
so leaving Top Bar and Status Bar and everything in the area unchanged.
The other option is shown as "Fullscreen Area" and it calls the same
operator with a use_hide_panels property. This hides the global areas
and also all regions in the area. This was added as an option for the
stereo 3D pipeline for viewing without the distraction of UI elements
that cause depth issue. #142418 further removed text overlays and the
navigation gizmos. This PR just renames the option to better describe
the result, using "Focus Mode".

Pull Request: https://projects.blender.org/blender/blender/pulls/142605
2025-07-29 21:30:25 +02:00
Harley Acheson
bbfc42fbf7 UI: Hide Content Selectively for Full Screen Area
Commit #142418 hid the navigation gizmo and text overlays while in Full
Screen Area by just not allowing those operations while in that mode.
This PR undoes that and instead selectively hides those items and
restores them afterward if they had been showing. The difference is
that this makes it possible to optionally bring them back while in the
mode. This adds a new fullscreen_flag to bScreen to store what was
visible to allow restoring afterward.

Pull Request: https://projects.blender.org/blender/blender/pulls/143144
2025-07-29 20:22:11 +02:00
Habib Gahbiche
06fe1357cf Cleanup: Silence warning on buildbot windows
`warning C4805: '==': unsafe mix of type 'short' and type 'bool'`

Pull Request: https://projects.blender.org/blender/blender/pulls/143567
2025-07-29 18:15:52 +02:00
Daniel Salazar
750d0df4e7 Shaders: Change default Blackbody node temperature to 6500K
Match the default value in Light Properties.

Pull Request: https://projects.blender.org/blender/blender/pulls/143504
2025-07-29 17:49:05 +02:00
Omar Emara
0a1d146389 Fix #143542: Missing Media Type when in saving operator
If the scene is currently set to a Video media type and the user uses
the Save Image As operator, the Media Type in the operator will be
empty. That's because the image saving format is initialized based on
the scene format, but image saving does not support videos, so the enum
is invalid in that context.

This issue already existed before the introduction of media types, but
it happened for the file format field directly.

To fix this, we default to an image type if the scene is set to a video.

Pull Request: https://projects.blender.org/blender/blender/pulls/143549
2025-07-29 16:21:50 +02:00
Lukas Tönne
e676146516 Fix: Deleting instances fails assert on index range
Resizing instances initializes new element attributes, but this is only
valid when the capacity grows. Shrinking produces an invalid index range.

Pull Request: https://projects.blender.org/blender/blender/pulls/143535
2025-07-29 16:00:16 +02:00
Christoph Lendenfeld
5dfbe1af21 Refactor: Replace PBONE_SELECTED macro with functions
This PR changes the uses of `PBONE_SELECTED` and all the
places where it *should* have been used
with a new function `bone_is_selected` or `...editbone`
and `...pose_bone` specializations.

No functional changes intended.

Do note that there are still places in the code
where this function should probably be called,
but this PR is very careful not to change any behavior,
even if the current behavior is probably wrong.

In preparation for storing pose bone selection state
on the `bPoseChannel`
Related to #138482

Pull Request: https://projects.blender.org/blender/blender/pulls/139496
2025-07-29 14:37:35 +02:00
Campbell Barton
3de916ca25 RNA: support for marking properties as deprecated
Deprecation meta-data support for RNA properties.

- Properties may have a deprecated note and version.
- Warnings shown when these are accessed from Python.
- A note is included in the generated documentation.

Support for marking functions as deprecated can be added in the future.

Ref !139487
2025-07-29 22:09:59 +10:00
Campbell Barton
c4ba04428c PyAPI: show Python warnings by default when debugging
Show warnings for debug builds or when `--debug-python` is passed in.

Without this, only scripts running in the `__main__` namespace
show warnings - hiding warnings for almost all scripts & add-ons.

This is also needed so deprecation warnings can be shown, see !139487.
2025-07-29 22:09:59 +10:00
Campbell Barton
0da99335e8 Cleanup: various minor changes to convexhull_2d
- Only use `float2` from blender's namespace
  otherwise reference blender namespace explicitly.
- Improve code comment formatting.
- Replace defines with std::numeric_limits.
- Replace `float[2]` with `float2 &`.
2025-07-29 21:18:09 +10:00
Christoph Lendenfeld
b27c24e88f Fix #141732: Asset Screenshot does not capture for Cycles
When trying to capture an asset preview screenshot of the 3D viewport while in
Cycles render preview mode, the screenshot would not capture any geometry.

It turns out the function used (`ED_view3d_draw_offscreen_imbuf`) is not useful
for cycles because it doesn't give cycles time to render.

Instead of having cycles rendering, potentially taking a long time, we fall back to
a direct screencapture.
This has the disadvantage that the background will not be transparent in this case,
but this is a limitation we can document.
Also, instead of only excluding Cycles, I chose to include only EEVEE. That way,
things will work even when using 3rd party render engines.

Pull Request: https://projects.blender.org/blender/blender/pulls/142241
2025-07-29 12:36:36 +02:00
Campbell Barton
77945b7cd2 BLI_convexhull_2d: enable USE_ANGLE_ITER_ORDER_ASSERT
The fix for #143390 allows the assertion that angle iteration is
in-order to be enabled again.
2025-07-29 18:01:58 +10:00
Kace
f955eae545 Compositor: Improve File Output node UI
Makes the File Output node panel similar to the Render Output node.
Instead of a dropdown, color management enum property expanded in UI.
Color management settings are now moved inside a panel.
Add/remove file subpapth buttons moved to the side of UIList.

Resolves #133501

See images in PR description for visual changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/133747
2025-07-29 09:55:48 +02:00
Campbell Barton
87f9fd8fb3 Fix #143390: Incorrect results from BLI_convexhull_aabb_fit_points_2d
Resolve an error in `BLI_convexhull_2d` where *almost* overlapping
points could result in the hull including *concave* points.
This tended to happen with larger polygons in the range of 100-500.

The regression is likely caused by [0] since this optimization
relies on the input not having any concave coordinates.

[0]: 888c4d0766
2025-07-29 07:35:53 +00:00
Campbell Barton
c737c30b38 Cleanup: spelling in comments (make check_spelling_*) 2025-07-29 10:39:50 +10:00
Hans Goudey
1557d5c388 Fix: Potential null pointer dereference in attribute accessors
`AttributeIter::get()` could potentially use the `accessor` field
which wasn't set for curves or mesh vertex groups. "is_builtin"
can also be explicitly set for this case.
2025-07-28 17:59:01 -04:00
Hans Goudey
a358e1c53d Fix: Some enum item buttons don't function after recent cleanup
Caused by ecd8de4bea
2025-07-28 15:32:31 -04:00
Clément Foucault
55a0e427c5 GPU: Remove mip render workaround and recursive downsample
Recursive downsample was only used by workbench DoF
which can be expressed using mip view instead.

The mip render workaround was creating GL error on startup
and is not needed anymore.

Pull Request: https://projects.blender.org/blender/blender/pulls/143246
2025-07-28 19:05:36 +02:00
Jacques Lucke
5f132d3f07 Nodes: support storing internal data in Bundle
Currently, bundles can only store socket values of Geometry Nodes. However, it
can make sense to store other kinds of data too. Specifically, this patch adds
support for storing arbitrary internal data in a bundle. This is useful when
storing e.g. the physics world when implementing a proper physics solver for
Geometry Nodes (like in #143171).

One can still see that the data exists in Geometry Nodes in the tooltip, but one
can't extract it. Built-in nodes can still read that data.

Storing built-in data in bundles can also be done as an alternative to having a
new "internal data socket" as we talked in a workshop in the past:
https://code.blender.org/2024/11/geometry-nodes-workshop-october-2024/#internal-data-sockets

A bundle still has to be copyable. Internal data is expected to use implicit
sharing. That way copying it just requires increasing the user count of the
data.

Pull Request: https://projects.blender.org/blender/blender/pulls/143472
2025-07-28 19:05:18 +02:00
Aras Pranckevicius
04cb3c1bbd VSE: Faster Histogram scope calculation
Histogram was calculated by copying the rendered image, transforming it
into display space, and calculating the histogram on that. On large
resolutions, this copy+transform+free of the temporary image was taking
up majority of the time. Especially for default use case when the
display transform is a no-op.

Change the code so that display transform, if needed, is done directly
inside histogram calculation, without needing a full-size temporary image.

Performance of histogram calculation, on Ryzen 5950X (Windows), on
a 4K resolution image, with default color management settings:
- PNG (SDR): 3.9 -> 0.9ms
- EXR (HDR): 41.3 -> 6.3ms

With display colorspace (P3) that is different than the sequencer
colorspace (sRGB):
- PNG (SDR): 25.3 -> 11.3ms
- EXR (HDR): 64.9 -> 10.6ms

It also fixes calculation of histogram on float (HDR) images that have
alpha channel; the histogram was wrongly calculated on premultiplied
color values, which was not consistent with how it was calculated
on the byte images.

Pull Request: https://projects.blender.org/blender/blender/pulls/143175
2025-07-28 18:39:01 +02:00
Habib Gahbiche
794f33b8d6 Cleanup: use version_node_add_empty to add nodes in versioning
Pull Request: https://projects.blender.org/blender/blender/pulls/143476
2025-07-28 18:31:25 +02:00
Hans Goudey
32c9bd8b81 Cleanup: UI: Remove unused min/max arguments to uiDefIconTextBut
These min and max arguments are unused, 0 is passed everywhere.
2025-07-28 11:27:52 -04:00
Hans Goudey
ecd8de4bea Cleanup: UI: Remove unnecessary button arguments
Passing the current enum value as a float to the "min" argument
doesn't seem to do anything. It's also the only place that the min
and max arguments to `uiDefIconTextBut` are used.
2025-07-28 11:27:52 -04:00
Hans Goudey
3936d7a93e Fix #142485: Shading artifacts with free custom normals and scale transform
When transforming a geometry, we often apply the transposed inverse
to normals / custom normal data. However, that matrix can still contain
scale from the original matrix. That scale has to be removed so we can
avoid also scaling the normals.

I used the opportunity to remove the duplication between mesh and curves
processing of the custom normals, and to formalize an optimization to
skip the final normalization of each vector if the transform is such
that it isn't necessary. The new functions don't fit beautifully into
their public headers, but I don't know of a better place for them.

Pull Request: https://projects.blender.org/blender/blender/pulls/142896
2025-07-28 17:25:34 +02:00
Sergey Sharybin
07bf1bd87b OpenSubdiv: Switch away from GLSL on Apple
Use MTLPatchShaderSource to provide the patch basis shader source on
all Apple platforms. The immediate advantage of this change is ability
to use GPU subdivision on iOS. Another advantage is that it moves us
further away from frameworks which got deprecated by Apple and it might
save us some headache in the future.

Also tweak backend-specific defines to match definitions from OpenSubdiv.
The annoying difference is that OSD_PATCH_BASIS_METAL is defined by the
OpenSubdiv as 1 in the very beginning of the base code, which is not done
for the OSD_PATCH_BASIS_GLSL is not defined by the OpenSubdiv at all.

Ref #143445

---

TODO:
- [X] Check it works correctly on macOS
- [x] Check it works correctly on Linux

Pull Request: https://projects.blender.org/blender/blender/pulls/143462
2025-07-28 16:54:10 +02:00
Jacques Lucke
63954843c2 Nodes: add utility to get virtual array for list
Pull Request: https://projects.blender.org/blender/blender/pulls/143469
2025-07-28 16:43:48 +02:00
Jacques Lucke
cf9939d3f2 Fix: Nodes: support choosing list socket shape for supported types 2025-07-28 16:28:05 +02:00