Commit Graph

123427 Commits

Author SHA1 Message Date
Pratik Borhade
c627ea9aca Fix #147067: gpu.types.GPUFrameBuffer absent in latest 5.0 build
Mistake in 9d0fe5573b

Pull Request: https://projects.blender.org/blender/blender/pulls/147099
2025-10-01 11:18:26 +02:00
luz paz
8b16934623 Cleanup: Fix typos in source/blender/editors comments
Fixes different typos in comments throughout the source/blender/editors subdirectory.

Pull Request: https://projects.blender.org/blender/blender/pulls/146196
2025-10-01 11:08:48 +02:00
Aras Pranckevicius
ed9fc54e0e Fix #147006: VSE preview crashes with too high output resolution
Check whether creating GPU textures succeeds before using them.
However, currently when that happens there is no indication to the user
that "hey the resolution is maybe too big". Not sure what is the best
way to do that however; e.g. Workbench rendering also does not
indicate that in a similar scenario.

While at it, add GPU_is_safe_texture_size instead of duplicating
the same logic in two places.

Pull Request: https://projects.blender.org/blender/blender/pulls/147043
2025-10-01 10:08:18 +02:00
Jacques Lucke
6614244a69 Geometry Nodes: improve warning panel title
The goal is to give more information to the user without having to open the
panel. Specifically, it's useful to know if there are any warnings/errors or
just info messages.

Pull Request: https://projects.blender.org/blender/blender/pulls/147103
2025-10-01 09:36:27 +02:00
Brady Johnston
8b3be68b3d Geometry Nodes: new Join Bundle Node
Adds a Join Bundle node with a multi-input Bundle socket. Bundles are
iterated on the top level of each input bundle and items added to the resulting
single bundle. While creating the final bundle existing items have priority and
new items with an already existing name are discarded.

There is an info message when there are duplicate keys in the input bundles.

Co-authored-by: Brady Johnston
Co-authored-by: Jacques Lucke
Pull Request: https://projects.blender.org/blender/blender/pulls/146750
2025-10-01 09:20:11 +02:00
Campbell Barton
f8c4d743bc PyDoc: use set[Literal[...]] as part of the type definition
Move literal values into the type definition in BMesh PyAPI docs.
2025-10-01 17:16:44 +10:00
Campbell Barton
f29330c7b2 PyDoc: correct type links in bmesh Python module
Type links without a leading module weren't recognized,
links to the types were not created in generated docs.
2025-10-01 17:05:54 +10:00
Campbell Barton
2107bd7326 Cleanup: rename as_needed -> if_needed
Follow the naming convention used elsewhere in the code.
2025-10-01 16:01:48 +10:00
Campbell Barton
7d67113a8a Fix: failure to set relative paths when adding an image strip
Calling SEQUENCER_OT_image_strip_add from Python attempted to
read a non-existent property "filepath" to check if the path was
relative. Use the "directory" for this instead.

The error occurred with the test file from #146433.

Ref !147100
2025-10-01 15:46:37 +10:00
Campbell Barton
1884e049e8 Fix #147088: Crash copying custom-normal in face + vertex selection mode
The logic to copy custom normals checked for selection but didn't
account for the selection-history failing to initialize any
custom-normal loops.

Resolve by using the regular selection if the selection-history
cannot be used as a source for loop-normals.

Ref !147087
2025-10-01 03:40:07 +00:00
Campbell Barton
866c806657 Fix #146564: Crash flipping custom normals
Flipping custom normals assumed BMLoopNorEditDataArray contained all
selected faces which isn't necessarily the case (when mixing modes and
using the selection history).

Resolve using selected faces for custom normal flipping operations,
ignoring the current selection mode.

Ref !147087
2025-10-01 03:40:06 +00:00
Campbell Barton
2fd3b557d8 Refactor: move logic for creating custom-normal arrays into functions
Also add `BM_loop_normal_editdata_array_init_with_htype`
(needed to fix #146515).

Ref !147087
2025-10-01 03:40:04 +00:00
Clément Foucault
7ad9a2a72b GPU: Move gl_FragStencilRefARB to be scanned and added to created info 2025-09-30 21:33:33 +02:00
Clément Foucault
723f4bc549 GPU: Remove support for matrices and arrays in shader interfaces
These are not supported in Metal. Removing these corner cases
avoid a lot of boiler plate code in the backend.
2025-09-30 21:03:31 +02:00
Sean Kim
0a72429ea8 UV Sculpt: Rename strength_curve and curve_preset
Similar to 327a1925cf

* Renames `strength_curve` to `curve_distance_falloff`
* Renames `curve_preset` to `curve_distance_falloff_preset`

These changes are done for consistency with the other concepts in the
other paint modes.

Pull Request: https://projects.blender.org/blender/blender/pulls/147071
2025-09-30 20:57:19 +02:00
Clément Foucault
f934418af2 Cleanup: Metal: Remove remains of instanced attributes 2025-09-30 20:54:46 +02:00
Clément Foucault
ef8319aaee GPU: ShaderCreateInfo: Add convenience ResourceString
This will improve readability of shader resource generation
code.
2025-09-30 20:54:46 +02:00
Ramon Klauck
412b5b3b3f Fix: VSE: Propagate split to connected strips by default
Currently, attempting to split connected strips that are not both
selected means that only one of the strips are affected.  This violates
the "connected" principle, so this PR makes the split operator propagate
the split to connected strips by default. Holding alt returns old
behavior (ignores connections), similar to selection logic.

Pull Request: https://projects.blender.org/blender/blender/pulls/146380
2025-09-30 18:12:12 +02:00
Aras Pranckevicius
1af6ac57f5 Fix #146943: VSE crash due to recursive mask rendering
When a strip modifier uses an adjustment layer that is above it
as the mask input, this leads to recursive rendering. Similar to the
fix in !146624, pass SeqRenderState to modifiers as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/147029
2025-09-30 16:54:46 +02:00
Jeroen Bakker
2468b3c7dd Fix: Renderdoc uses incorrect flags
Unit tests passed incorrect flags resulting in renderdoc to not use
debug information when performing step by step debugging.

Pull Request: https://projects.blender.org/blender/blender/pulls/147063
2025-09-30 16:07:52 +02:00
Omar Emara
74b1b95218 Fix #146579: Frame variables not replaced in File Output node
Frame variables in File Output paths are not replaced by the frame in
single renders. This is because the path construction function gets
passed false for frame usage to not force append frames, which also
handles frame replacement.

To fix this, we replace frame variables manually without forcing them
before constructing the path.

Pull Request: https://projects.blender.org/blender/blender/pulls/146779
2025-09-30 15:24:09 +02:00
Falk David
c08fccae53 Fix #146155: VSE: Too agressive sequencer scene versioning
The sequencer scene was set to the active scene in the window
in all cases. This is not great because we really only expect
the sequencer scene to be assigned when it was used.

The fix changes the versioning code to ensure that
1) The window has any VSE open.
2) The active scene uses an `Editing` struct (e.g. the user created
  strips, or interacted in some way with the VSE).

This also changes back the test that checks for the usages
of IDs. Before this test had to include the workspace for
the default scene. Now this scene is no longer used
by the workspace, because the versioning that sets
the sequencer scene is no longer run.

Pull Request: https://projects.blender.org/blender/blender/pulls/147044
2025-09-30 15:04:57 +02:00
Sybren A. Stüvel
dbcb701eb2 Anim: make it easier to convert from legacy to current Action API
The changes:

1. Add `group_name` to the `channelbag.fcurves.new()` and
   `action.fcurve_ensure_for_datablock()` RNA functions.
2. Add `anim_utils.action_ensure_channelbag_for_slot(action, slot)`.
3. Add `channelbag.fcurves.ensure()` RNA function.

This makes it possible to replace this legacy code:

```py
fcurve = action.fcurves.new("location", index=2, action_group="Name")
```

with this code:

```py
channelbag = action_ensure_channelbag_for_slot(action, action_slot)
fcurve = channelbag.fcurves.new("location", index=2, group_name="Name")
```

or replace this legacy code:

```py
fcurve = action.fcurves.find("location", index=2, action_group="Name")
if not fcurve:
    fcurve = action.fcurves.new("location", index=2, action_group="Name")
```

with this code:

```py
channelbag = action_ensure_channelbag_for_slot(action, action_slot)
fcurve = channelbag.fcurves.ensure("location", index=2, group_name="Name")
```

Note that the parameter name is different (`action_group` became
`group_name`). This clarifies that this is the name of the group, and
not a reference to the group itself.

This is part of #146586

Pull Request: https://projects.blender.org/blender/blender/pulls/146977
2025-09-30 14:43:56 +02:00
Clément Foucault
2bf86f840d Fix #146813: EEVEE: AO With Shader To RGB fails to compile
This is caused by the forward_lib including eevee_nodetree_lib
before eevee_ambient_occlusion_lib.

Fixed by splitting eevee_nodetree_lib into the part that is
needed for forward_lib so that eevee_nodetree_lib is only
included from eevee_nodetree_frag_lib and eevee_nodetree_vert_lib.

Pull Request: https://projects.blender.org/blender/blender/pulls/146987
2025-09-30 14:05:53 +02:00
Jacques Lucke
c0de8c40ee Fix: Nodes: double clicking to enter/exit node group not reliable
The issue was that the used operator just took the active node into account.
However, clicking in empty space does not make the active node inactive.
Therefore, sometimes clicking on empty space would sometimes remove enter the
last selected group node. Furthermore, double clicking on other nodes may also
trigger exiting the current group.

This is fixed by introducing a new operator that explicitly checks what node is
hovered.

Pull Request: https://projects.blender.org/blender/blender/pulls/147053
2025-09-30 13:30:49 +02:00
Jeroen Bakker
da39dc1da8 RenderDoc: Grouping of unit tests
This PR introduces grouping of the unit tests inside debug groups.
Previously a capture would contain a single test. But for performance
reasons multiple tests are run in a single process, making it unclear
which commands belong to which test.

This PR will add a debug group for each test that is run.

Pull Request: https://projects.blender.org/blender/blender/pulls/147046
2025-09-30 13:25:11 +02:00
Jeroen Bakker
0428afbfcc Fix: Debugging gpu tests in renderdoc
Step by step debugging of unit tests inside renderdoc didn't work as the
debug information wasn't included when running unit tests. This should
have been the case, but was broken when introducing
`--debug_gpu_compile_shaders` startup parameter.

Pull Request: https://projects.blender.org/blender/blender/pulls/147040
2025-09-30 12:54:35 +02:00
Jeroen Bakker
918edbcb4c Cleanup: Remove unused method
Pull Request: https://projects.blender.org/blender/blender/pulls/147038
2025-09-30 12:53:56 +02:00
Miguel Pozo
1d596082ce Fix #146194: Draw: Don't create duplis from temporary preview objects
Don't attempt to create duplilists from (preview) dupliobjects.
It may render the same instance multiple times, and leave dangling
pointers.

Pull Request: https://projects.blender.org/blender/blender/pulls/146988
2025-09-30 12:15:27 +02:00
Pratik Borhade
87f0d3c695 Fix #147014: Crash when manually typing object dimension
Caused by 8de2e6f9fb
Craah due to missing nullptr check for `layout` pointer.

Pull Request: https://projects.blender.org/blender/blender/pulls/147017
2025-09-30 11:57:27 +02:00
Habib Gahbiche
4f722eaae3 Compositor: "Copy" button duplicates node tree
Currently, the compositor template ID creates a new node tree. This is
inconsistent with other node editors where the button copies the node
tree.
Also use "New" in geometry nodes operator description instead of "Copy"

Pull Request: https://projects.blender.org/blender/blender/pulls/146222
2025-09-30 11:46:32 +02:00
Omar Emara
d75b8e5b6e Compositor: Make a distinction between inputs and passes
This patch makes a distinction between passes accessed through nodes
like the Render Layers node, and inputs accessed through nodes like the
Group Input node. Previously, the Group Input node returned the passes
of the active scene and view layer accordingly to the name, while now,
it only returns the Image (Combined) pass and the result will be zeros.

Pull Request: https://projects.blender.org/blender/blender/pulls/146831
2025-09-30 11:35:02 +02:00
Pablo Vazquez
193e5935d0 UI: Do not use TitleCase in tooltips
Also don't use "Use" for a boolean label.
Following the HIG.
2025-09-30 11:32:06 +02:00
Lukas Tönne
8697bffe22 Fix #146946: Breaking a node zone crashes on valid pointer assumption
The Node Wrangler addon has a _Reset Nodes_ operator that can remove the input
node of a node zone. This crashes in reference set updates because the code
expects valid input/output node pairs in each zone.

The fix is two-fold:
1. Finding zones for the runtime now returns an empty result to ensure no
  invalid node pointers are being accessed. This should not happen in practice,
  all operators should make sure zone relationships are not broken.
2. The node wrangler addon is updated to ignore all zone types, including the
  newer repeat, closure, and for-each-element zones. The type filtering was
  outdated and now uses the `bl_idname` consistently.

Pull Request: https://projects.blender.org/blender/blender/pulls/147028
2025-09-30 10:49:20 +02:00
Falk David
cd40f5b0f1 VSE: Story Tools: Sync object modes when switching scenes
Currenty, when switching from one scene to another, the mode
of the active objects (before & after) is left untouched.

This becomes a workflow problem when trying to work across
different scenes. E.g. when opening the new "Storyboarding"
template and scrubbing to the next scene strip, the Grease Pencil
object is now in Object Mode, when in the previous shot it was
in Draw Mode.

To solve this, when syncing scenes try to change the mode of
the next active object to the mode of the previous active object
if the type of the object is the same.

Pull Request: https://projects.blender.org/blender/blender/pulls/146981
2025-09-30 10:38:30 +02:00
Sybren A. Stüvel
acde9be6fd Fix: correctly update Actions when renaming/re-typing a custom property
Fix: correctly update Actions when renaming/re-typing a custom property

When renaming a custom property on a data-block, only update the
animation in a slot for that data-block. Previously all F-Curves were
updated, even when they were meant for other data-blocks.

This also handles the cases where the type of a custom property is
changed, and not just its name.

This is part of #146586

Pull Request: https://projects.blender.org/blender/blender/pulls/146979
2025-09-30 10:23:20 +02:00
Campbell Barton
a59be80d38 Fix #146836: Auto merge not working in edit mode
Regression in [0] removed checks for indices referencing themselves
which need to be kept but can still be used as targets.

Restore this logic as well as fixing another problem (#147022)
where auto-merge would not merge into the nearest vertex, this
was especially noticeable then the threshold was set to a large value
but would happen at smaller values too.

[0]: bdae3e28a2
2025-09-30 17:37:17 +10:00
Jacques Lucke
d21f9fa07d Refactor: Geometry Nodes: extract function to draw panel content in modifier
Besides extracting a function, this also cleans up the construction of the rna_path.
2025-09-30 06:56:55 +02:00
Guillermo Venegas
083cc599f9 Fix: Wayland/IME accessing stale IME data
Guard IME data access to ensure stale IME data isn't used.

Ref !146834
2025-09-30 11:01:39 +10:00
Pablo Vazquez
41a1e871ef UI: Update editor descriptions
A long overdue pass on editor descriptions/tooltips.

Some editors used a variation of the editor name as description, while
others didn't even have one. In some editors their functionality
changed so use this opportunity to reflect this (UV for example,
no longer depends on "mesh editmode").

See PR for details.

Pull Request: https://projects.blender.org/blender/blender/pulls/146968
2025-09-29 23:24:49 +02:00
marcopavanello
390f053e32 Fix #146630: Single Scattering Sky has darker pixels near horizon
Store the ground fading of Single Scattering sky directly in the LUT.

Co-authored-by: Lukas Stockner <lukas@lukasstockner.de>
Pull Request: https://projects.blender.org/blender/blender/pulls/146659
2025-09-29 20:56:32 +02:00
Sean Kim
0f3c6da272 UI: Add preset curve buttons for curve mapping template
To support setting the custom `CurveMapping` to a well defined preset,
there exist a number of operators that are hardcoded to apply a
particular preset to a particular curve.

This commit begins to replace this functionality and make it part of the
template itself, allowing the preset to be applied to any curve. For
now, it only supports either positive or negative slopes, primarily for
the brush usecases.

The `brush.curve_preset` and `brush.sculpt_curves_falloff_preset`
operators are unneeded after this change and have been removed.

Notably, these preset controls have not been added elsewhere, they can
be added on a case by case basis in future commits by interested
modules.

Pull Request: https://projects.blender.org/blender/blender/pulls/146847
2025-09-29 20:11:29 +02:00
Sean Kim
af8cb99b10 Paint: Add asserts for BKE_brush_curve_strength
Neither the `distance` or `brush_radius` parameters make sense to be
negative and can cause odd behaviors.

Pull Request: https://projects.blender.org/blender/blender/pulls/146698
2025-09-29 19:13:56 +02:00
Brecht Van Lommel
b168a96083 Refactor: Use enum class instead of bool video
Pull Request: https://projects.blender.org/blender/blender/pulls/146888
2025-09-29 19:01:39 +02:00
Brecht Van Lommel
df12a448ba Color Management: Save and load HDR images with 203 nits
Based on extensive testing, this gives matching HDR brighness across most
application, with both PNG and AVIF. Video remains at 100 nits as that
appears to tbe convention there.

This is implemented by adding two modified PQ and HLG color spaces to the
OCIO config on startup, and for the specific cases of image save and loaded
these will replace the regular PQ and HLG color spaces.

This was chosen rather than adding them as color spaces in the OCIO config,
so that it can work for any config with appropriate interop IDs, including
the ACES config. Additionally, it would be unclear how to make this work with
view + display transforms, we wouldn't want to burden the users with having
to pick a different display depending if they are saving images or video.

Ref #145855, #144911

Pull Request: https://projects.blender.org/blender/blender/pulls/146888
2025-09-29 19:01:33 +02:00
Jacques Lucke
ae2034e6c5 Attributes: make id attribute generic instead of built-in
The "id" attribute was built-in on curves (point domain), mesh (point domain)
and instances, but not on e.g. point clouds. This mismatch causes issues because
of the special rules regarding built-in attribute propagation. Furthermore, an
implication of this was that the id attribute had to be an integer attribute on
a specific domain, which is not always ideal.

This patch turns the id attribute into a normal generic attribute, except that
some nodes internally modify this attribute in special ways. This may cause some
compatibility breakage in rare cases, but that can generally be easily fixed by
either removing the id attribute or setting it explicitly on the right domain. I
can't think if a feasible way to avoid this unfortunately.

The internal special cases for the id attributes are generally skipped unless
the attribute is an integer attribute on the point/instance domain.

Pull Request: https://projects.blender.org/blender/blender/pulls/146941
2025-09-29 18:47:51 +02:00
Jacques Lucke
1ffa0c4648 Nodes: support searching for group inputs
This simplifies finding where a specific Group Input is used in a node group.
It extends what was added in #146882.

Pull Request: https://projects.blender.org/blender/blender/pulls/146992
2025-09-29 18:34:18 +02:00
Jacques Lucke
01ccf31d20 Fix: Nodes: propagated menu expanded state to group input
Previously, when a new group input was created from an expanded menu
socket, the expanded flag was not set on the group input.
2025-09-29 18:28:20 +02:00
Casey Bianco-Davis
d4f84619ea Grease Pencil: Add new Corner Types
This adds three corner types: `Round` `Sharp` and `Flat`.
These control how the corner of `Grease Pencil` line strokes are rendered.

- The `Round` type draws circular arcs, and is what `Grease Pencil`
   currently supports and is default.
- The `Flat` type cuts off the tip of the corner.
- The `Sharp` type allows for sharp corners to be created.
  If the angle is sharper than `Miter Limit` then the tip will be cut like `Flat`

These three types match the main types of `line joins` present in `SVG`
files.

This data is stored in one `Point` attribute called `miter_angle`.
This stores both the `Corner Type`, the `Miter Limit` and defaults to
the `Round` type.

This PR adds:
- Rendering of the corner types.
- An operator for setting the `Corner Type` and `Miter Angle` attribute.
- Corner types to the `Outline` operator and modifier.

Part of #145380.

Pull Request: https://projects.blender.org/blender/blender/pulls/143688
2025-09-29 18:19:05 +02:00
Jacques Lucke
e53f0066f9 Fix #146409: nested shader node outputs are ignored
This was supported before, and was accidentally removed in 32c301e3cf. This
patch brings back support for nested shader node outputs. Only rule is that they
must not be in a zone.

Pull Request: https://projects.blender.org/blender/blender/pulls/146983
2025-09-29 18:17:35 +02:00