Commit Graph

153501 Commits

Author SHA1 Message Date
Jacques Lucke
d685fdbf99 Refactor: Nodes: extract socket value inferencer from usage inferencer
Value and usage inferencing can be done independently. Usage-inferencing uses
the value-inferencing but not the other way around. Extracting value-inferencing
makes the separation more clear and also simplifies potentially reusing the
value-inferencing code later on.

Pull Request: https://projects.blender.org/blender/blender/pulls/145492
2025-09-01 21:07:10 +02:00
Aras Pranckevicius
eb96ef2dff Fix #145116: new FBX importer does not handle geometry transform + instancing properly
When instanced meshes were using FBX geometric transforms, the code
was not telling ufbx to create proper adjustment helper nodes due to
UFBX_GEOMETRY_TRANSFORM_HANDLING_MODIFY_GEOMETRY_NO_FALLBACK flag.
That flag was put in earlier, before import of armatures was solidified,
turns out using the proper flag (UFBX_GEOMETRY_TRANSFORM_HANDLING_MODIFY_GEOMETRY)
is not a problem anymore.

Pull Request: https://projects.blender.org/blender/blender/pulls/145527
2025-09-01 19:39:54 +02:00
Bastien Montagne
2c42ca0657 Readfile: Assert given BHead _is_ an ID one in some util functions. 2025-09-01 19:19:44 +02:00
Philipp Oeser
113f3ae131 Fix #112936: Asset shelf breaks when changing preview size
Underlying reason here is just that whenever a region gets too large to
still be displayed in an area, it simply gets hidden.
This is expected (but also reported elsewhere, see #122277).

It has seen some reports though and it seems we can actually prevent the
AssetShelf from getting too high (and thus being hidden) in case many
rows are used and preview size is increased by automatically decreasing
row count.

Pull Request: https://projects.blender.org/blender/blender/pulls/145117
2025-09-01 18:34:02 +02:00
Alaska
2bb232f02d Cycles: Re-enable MNEE on HIP
This commit re-enables MNEE on the HIP backend for Cycles after the
recent update to HIP SDK 6.4 which fixed issues with MNEE.

Pull Request: https://projects.blender.org/blender/blender/pulls/145334
2025-09-01 16:51:44 +02:00
Brecht Van Lommel
2eaa8dc7d5 Compositor: Add Convert to Display node
This applies an OpenColorIO display, view and look transform on a color
in the scene_linear colorspace.

In general, OpenColorIO configurations do not contain a colorspace for
every view + display, especially if they are modern configs using the
display colorspace and shared view mechanisms. Nor do they include looks.
So the Convert Colorspace node is not sufficient.

Additionally, we would like to avoid making the colorspace list too long
in the default config, as we are adding many new views and transforms.

Exposure, gamma curves and white point functionality are not included
in this node, as there are native ways of doing that in the compositor.
These settings are marked non-editable in the Python API.

Pull Request: https://projects.blender.org/blender/blender/pulls/145069
2025-09-01 16:28:07 +02:00
Brecht Van Lommel
f7891ead7b Fix: Compositor Convert Color Space node fails on GPU with some colorspaces
Use GPU_shader_preprocess_source like we do for the viewport display shader.
Otherwise the ACES 2.0 view transform fails.

Pull Request: https://projects.blender.org/blender/blender/pulls/145069
2025-09-01 16:28:07 +02:00
Habib Gahbiche
bfff9c4c6d Fix: Image Sampler ignores sample size
How to reproduce:
- Load an image with random values
- Set sampler size to 1 (default)
- Sample a random image on a pixel
- Set sampler size to 64 (max)
- Sample the same image on the same pixel
- Notice how the value doesn't change

Pull Request: https://projects.blender.org/blender/blender/pulls/145318
2025-09-01 16:09:34 +02:00
Bastien Montagne
77e700a081 Fix #145295: Crash if not finding the linked data after relocating the library.
Mistake in refactor of Relocate code in a1abf9a64e, the handling of
cases where a valid (exisitng, missing linked placeholder ID) was not
found in the searched library(-ies) was not handled properly in the new
code.

These need to be ignored by remapping from old to new (relocated) IDs,
since it's better to keep the placeholder 'empty reference' IDs, than
remap to null!
2025-09-01 15:41:20 +02:00
Jeroen Bakker
dfd168f905 Vulkan: Remove resource pools
Multiple previous changes made resource pools obsolete. Resource
pools were used to keep track of resources when the frame is rendered.
Multiple frames can be rendered at the same time and resources could
overlap.

This has been replaced (not this commit) to be part of the render graph
and when an submission has completed the resources are recycled.

Continuation of: https://projects.blender.org/blender/blender/pulls/145408

Pull Request: https://projects.blender.org/blender/blender/pulls/145511
2025-09-01 15:34:14 +02:00
Demeter Dzadik
eb4c22c0a4 Copy Global Transforms: SKIP_SAVE on paste
Add the `SKIP_SAVE` option to the 'Paste Global Transform' operator
properties.

This fixes a bug with following repro steps:
- Specify a relative object
- Use relative copy/paste
- Try to use non-relative copy/paste
- It will fail because after you used the relative paste operator, the
  `use_relative` property is saved for ever as True.

Pull Request: https://projects.blender.org/blender/blender/pulls/145262
2025-09-01 15:21:09 +02:00
Christoph Neuhauser
79ab23e063 Cleanup: Fix unused parameter warnings for Windows-only QoS functions
This PR fixes warnings on non-Windows systems for unused parameters of
QoS-related functions.

Pull Request: https://projects.blender.org/blender/blender/pulls/145503
2025-09-01 14:27:53 +02:00
Jeroen Bakker
a400b1d268 Cleanup: Mark unused variable
Pull Request: https://projects.blender.org/blender/blender/pulls/145504
2025-09-01 14:13:21 +02:00
Jeroen Bakker
c215ecfda9 Fix: Compilation error on Windows
1e523e2f5d was based on an earlier
version and this compilation error slipped to the cracks.
2025-09-01 13:51:01 +02:00
Janne Nylander
8d9754bfaa Fix: Grease Pencil: Pen tool moving incorrect handle when extruding from curve start
Previously, if a user extruded a curve with the Pen tool and held down
the `Ctrl` modifier key, the right handle would always be moved
independently. This should not happen when extruding a curve from
the beginning.

This pull request adds a check that will determine if the left handle
is currently selected when extruding a curve. This is the case, when
extruding a curve from the beginning. Then, the left handle will be
moved independently, instead of the right handle.

Pull Request: https://projects.blender.org/blender/blender/pulls/145235
2025-09-01 13:37:12 +02:00
Bastien Montagne
566e390d7c I18N: Update UI translations from git/weblate repository (51922129e12b3cb9). 2025-09-01 13:01:13 +02:00
Brecht Van Lommel
62eac6da17 Tests: Update bake tests for new selection requirements
Ref #137389

Pull Request: https://projects.blender.org/blender/blender/pulls/145502
2025-09-01 12:40:49 +02:00
Jeroen Bakker
f80083491a Revert "Vulkan: Remove resource pools"
This reverts commit ce0406b97b.
Reports on blender-coders mentioned that it could fail on startup.
2025-09-01 12:39:39 +02:00
Clément Foucault
62f5965dee Fix: GPU: Compilation failure on windows 2025-09-01 12:38:13 +02:00
Weizhen Huang
0a9ddb58f0 Fix #145419: Cycles render pass missing when changing display pass
Not sure why `is_modified()` was deleted, probably by accident.

Pull Request: https://projects.blender.org/blender/blender/pulls/145501
2025-09-01 12:30:32 +02:00
Alaska
42d8cd0a18 Cycles: Remove warning about HIP being unstable
After the recent HIP SDK update on Windows, HIP is back to being
stable, so remove the warning about it being unstable.

Pull Request: https://projects.blender.org/blender/blender/pulls/145499
2025-09-01 12:08:50 +02:00
Clément Foucault
e7bcec779d GPU: Shader: Use parser for namespace_mutation
Pull Request: https://projects.blender.org/blender/blender/pulls/145496
2025-09-01 11:56:03 +02:00
Clément Foucault
d47ad68b0c GPU: Shader: Use parser for using_mutation 2025-09-01 11:56:02 +02:00
Clément Foucault
278438e504 GPU: Shader: Use parser for assert processing 2025-09-01 11:56:02 +02:00
Clément Foucault
ebf095a4b9 GPU: Shader: Add string parsing and merging
This avoid issues when trying to use printf with
multiline string literals.
2025-09-01 11:56:02 +02:00
Clément Foucault
72e5d5066a GPU: Shader: Fix template in template support
Processing needed to be adapted to support this
use case.
2025-09-01 11:56:02 +02:00
Brecht Van Lommel
61dd8a1435 Fix #143060: Snapping to curve object does not use subdivision modifier
Also avoids calling ensure subdivision wrapper unnecessarily when a
mesh is in edit mode.
2025-09-01 19:35:12 +10:00
Martijn Versteegh
99670071b2 Render: Bake only to explicitly selected images
When baking to textures, bake only to  selected (and active) images, as
opposed to all active images.  previously the targets were all active
images in all materials. This made it very unclear which images were
baked to, as images can be active without being selected. It also made
it impossible to *not* bake to any image in a material since there is
always an active image as long as an image texture node exists. This
often lead to accidentally overwriting images of existing PBR materials.

Baking only to selected images fixes the workflow where you have a model
with multiple materials where you only want to bake some of them. For
example a model with a PBR material for the roof and a procedural bricks
material for the walls. On export you want to bake the procedural
bricks, but not the  PBR roof.

This is an API breaking change.

Pull Request: https://projects.blender.org/blender/blender/pulls/137389
2025-09-01 11:31:12 +02:00
Christoph Neuhauser
1e523e2f5d Fix #143653: Add use of Quality of Service (QoS) API on Windows
This PR adds code for setting the Quality of Service (QoS) level of the
process on Windows. This can, e.g., make sure that on hybrid systems
P-cores are utilized even when the app window is out of focus.

In the following cases, it is adjusted from the default behavior:
- In wm_jobs.cc the QoS level is raised while a priority job is running.
- The command line option `--qos [high|eco|default]` can be used to
  change the QoS level of the process.
- By default, the QoS level is raised for the EEVEE performance tests,
  as they check viewport rendering performance and would otherwise be
  reliant on never going out of focus to not get a downgraded QoS level.
  By default, they are created with an out of focus window at the time
  of landing this PR. This PR makes sure that they actually measure the
  animation replay performance attainable during real-world use.

Pull Request: https://projects.blender.org/blender/blender/pulls/144224
2025-09-01 11:19:17 +02:00
Clément Foucault
13329ad984 Metal: Workaround broken shader log
Disable shader log parsing for now as
it conflicts with the `#line` directives
added during preprocessing.

Pull Request: https://projects.blender.org/blender/blender/pulls/145495
2025-09-01 10:53:25 +02:00
Omar Emara
5c450290ff Fix #145403: Viewport Compositor error always persists
Errors produces by the viewport compositor always persists even after
their cause is fixed. That's because the error message is not cleared
before execution, which this patch fixes.
2025-09-01 10:25:23 +03:00
Jeroen Bakker
ce0406b97b Vulkan: Remove resource pools
Multiple previous changes made resource pools obsolete. Resource
pools were used to keep track of resources when the frame is rendered.
Multiple frames can be rendered at the same time and resources could
overlap.

This has been replaced (not this commit) to be part of the render graph
and when an submission has completed the resources are recycled.

Pull Request: https://projects.blender.org/blender/blender/pulls/145408
2025-09-01 08:37:55 +02:00
Janne Nylander
63c869b8b7 Fix #145471: Pen tool could not assign first material slot to stroke
The material slot index check in `add_single_point_and_curve` in
`grease_pencil_pen.cc` would check if the selected material slot index
was not 0.

I think the idea was to check if there isn't any active material slot
selected, in which case
`const int material_index = this->vc.obact->actcol - 1;`
would return -1.

This PR just changes the check value from 0 to -1.

Pull Request: https://projects.blender.org/blender/blender/pulls/145473
2025-08-31 18:05:52 +02:00
Pratik Borhade
abfb359b6a UI: Store collapse state of node interface panel
Every redraw to node interface tree view was resetting the collapsed
state of panels. Added `NODE_INTERFACE_PANEL_IS_COLLAPSED` to store the
collapse/expand state.

Resolves #145153

Pull Request: https://projects.blender.org/blender/blender/pulls/145157
2025-08-31 05:18:59 +02:00
Sean Kim
0d3788ff00 Sculpt: Remove hardcoded plane offset value for clay brushes
The Clay and Clay Strips brush have a built-in hardcoded Plane Offset of
0.40m and 0.18m, respectively. This value is added to the displacement
scalar after the pressure sensitivity is factored into the calculation,
leading to the pre-bundled essential assets not responding to tablet
pressure when enabled and potentially confusing behavior otherwise.

Pull Request: https://projects.blender.org/blender/blender/pulls/144382
2025-08-31 00:04:12 +02:00
John Kiril Swenson
4bdcc7643b Fix: VSE: Silence RNA_boolean_get warning for use_sequence_detection
Caused by #143974.
Allow `use_sequence_detection` and `use_placeholders` to be
automatically drawn by `sequencer_add_draw_check_fn` when applicable
instead of unconditionally adding it to the UI.

Ordering of these two can be preserved by swapping the original
`RNA_def_boolean` calls.

Pull Request: https://projects.blender.org/blender/blender/pulls/145431
2025-08-30 00:27:10 +02:00
Sean Kim
8188dbd246 Paint: Change brush size values to represent diameter
This commit changes the internal storage and user-facing representation
of the brush size values (`size` and `unprojected_size`) from radius
to diameter.

This has a number of benefits:
* While the radius is more helpful for many internal operations, it is
  more natural to estimate the size of a brush by the diameter
* Because the pixel size is stored as an integer, users are currently
  unable to make brushes that have an odd numbered diameter, notably
  preventing the ability to make single pixel brushes.

Internally, the `Brush` and `UnifiedPaintSettings` size values are
versioned to double their on-disk values. The relevant `BKE` functions
that access the data return the radius at runtime, and any internal
`struct`s that stored radius continue to do so.

The 'Radius' text for brushes is changed to 'Size' and all references
to it in descriptions are changed to 'size' as well.

Resolves #134204

Pull Request: https://projects.blender.org/blender/blender/pulls/142495
2025-08-30 00:18:41 +02:00
Nika Kutsniashvili
cb22938fe9 UI: Theme: Move keyframe properties to common
Continuing #140360

This PR moves keyframe theme properties from editors into Common.
Besides Dope Sheet, keyframe properties were in:

- Sequencer (almost all types, and might use more in the future)
- 3D Viewport, where the active object name overlay used a separate Object Keyframe color when
it had keyframes on the current frame. Now it uses the common Keyframe Selected color, instead
of having its own property just for this little text.
- Keyframes in Movie Clip Editor were hard-coded white, now they use a common Keyframe color.
Selected colors used wrong long key selected color, now they use common Keyframe Selected color.
- Movie Clip Editor also used separate colors for what it called "Strips", but they are visually
the exact same thing as "long keys" in Dope Sheet, so they use common long key colors now.

There are Keyframe Border properties in Dope Sheet, Sequencer, and NLA, but they're not shared
because they're drawn on very different backgrounds, in different sizes, with different fill colors, so
it's difficult to make one color work for all of them, and it can restrict customization and accessibility.

Video in PR

---

Details:
- Long keys in Dope Sheet/Clip Editor and Strips in NLA used the same internal "strip" attribute.
Those needed to be separated to properly use long key colors in common, without worrying
about affecting unrelated things, and those two are as unrelated as they can get.
To properly separate them I added new "long_key" attributes, and corresponding
`TH_LONGKEY` and `TH_LONGKEY_SELECT`.
- Long keys in Movie Clip Editor had hardcoded alpha. Now they use alpha of the theme color.

Pull Request: https://projects.blender.org/blender/blender/pulls/144259
2025-08-29 23:22:38 +02:00
Jesse Yurkovich
9f4ac95357 Fix: USD: Camera FStop of 0 means no depth of field
If a USD camera has an fstop value of 0, we need to treat that as
meaning DOF should be disabled (and animate it accordingly).

https://openusd.org/release/api/class_usd_geom_camera.html#a335e1647b730a575e3c0565e91eb8d49

Pull Request: https://projects.blender.org/blender/blender/pulls/145366
2025-08-29 22:33:10 +02:00
Sean Kim
c84b81003f Refactor: Use container types for Subdiv face_ptex_offset
This commit changes the face_ptex_offset from a manually managed int
array to a blender::Array. This required a number of changes:

* The `Subdiv` struct is no longer trivial, so MEM_new and MEM_delete
  need to be used
* The Draw module API has an overloaded set of `origindex_buffer`
  methods created to take in a Span instead of an int pointer and size

Pull Request: https://projects.blender.org/blender/blender/pulls/141702
2025-08-29 21:52:19 +02:00
Alaska
e86bff3621 Fix: UI: Correct spelling of Bézier in Curves add menu
Pull Request: https://projects.blender.org/blender/blender/pulls/145338
2025-08-29 20:00:05 +02:00
Bastien Montagne
1ea8708153 Fix (unreported) wrong handling of system-defined IDProperties in RNA.
In RNA access code, when trying to 'decode' a given property into valid
data, if the existing storage IDProperty for a runtime-defined RNA
property was detected as invalid (e.g. wrong dimensions for an
array...), code was trying to remove that property from the user-defined
IDProperties (custom properties) instead of the system ones.

Mistake from the original IDProperty split commit (7276b2009a).
2025-08-29 18:47:37 +02:00
Miguel Pozo
58fb8e86eb Fix #145321: Crash with Viewer Node on Values without Geometry
Don't init duplis if `dupli_list` is empty.
Otherwise, the `data->dupli_parent` "leaks" into the next objects.

This also asserts that dupli iteration properties are set to default
values when calling `deg_iterator_duplis_init`.

Pull Request: https://projects.blender.org/blender/blender/pulls/145407
2025-08-29 18:43:55 +02:00
Hans Goudey
ae53dc3a60 Sequencer: Avoid storing un-tracked pointers in blend files
Currently, sequencer structs contain several pointers to data within
other structs. These pointers need to be remapped as the structs are
reallocated when reading from blend files. That has worked so far
because the pointers are exactly the values from the Blender session
that saved the file. With the implementation of #127706, the pointers
in the file aren't "real" anymore, and we can't offset them to get the
struct that contained the data. I'm working on the pointer stability
solution now to address a memfile undo performance regression
in 5.0 due to the `AttributeStorage` read/write design.

This commit replaces these 4 mid-struct pointers to point to the
containing strips instead, and uses some trivial logic to access the
fallback root sequence channels and strips. This makes the pointer
remapping on file load possible again.

This change is backward compatible but not forward compatible.

Second try after #144626

Pull Request: https://projects.blender.org/blender/blender/pulls/144878
2025-08-29 16:58:08 +02:00
Julien Duroure
a2614464e5 glTF importer: add comment after recent changes 2025-08-29 16:45:45 +02:00
YimingWu
2529b79486 Fix #145228: Wrong material when copying grease pencil strokes
When copying grease pencil strokes, `BKE_object_material_get()` was used
to retrieve the material ID, but the index starts at 1 instead of 0,
this caused the pasted material to be wrong. Now the index is properly
incremented to 1 when copying.

Pull Request: https://projects.blender.org/blender/blender/pulls/145398
2025-08-29 16:39:05 +02:00
Philipp Oeser
a82d09bee4 Fix #145391: File Output node: "Layers" uilist button is misaligned
Caused by 7d7562e849

Above commit added a `separator_spacer` (for no obvious reason?)
This PR removes it again.

Pull Request: https://projects.blender.org/blender/blender/pulls/145397
2025-08-29 16:13:12 +02:00
Julian Eisel
51e3884ee6 Fix: Typo in ID full name RNA description 2025-08-29 15:59:00 +02:00
Miguel Pozo
18b7b64dd4 Fix #145396: Selection doesn't consider viewport visibility
Missing check.
Regression from 8adb3e758f
2025-08-29 15:44:37 +02:00
Julian Eisel
5669adf7e6 Fix #145388: Pose library breaks double-click in file browser
The pose library registered a double-click keymap item for the file
browser keymap, because that was the only way to add keymap items to the
asset browser (which is just the file browser under the hood). Since
450f428434, the pose library apply & blend operators are available in
more contexts, since their check for an active asset was moved from the
operator poll to the operator execution. So the pose apply operator
would end up triggering.

The poll function could be adjusted somehow to return false in this
case, e.g. by checking if it's executed from a file browser (not an
asset browser).

However, the operator should be independent of where it's called from.
So instead this registers a separate keymap for the asset browser, so
the pose library operators can be registered exclusively for the asset
browser.
2025-08-29 14:58:40 +02:00