Commit Graph

153515 Commits

Author SHA1 Message Date
Bastien Montagne
469f54f484 BPY: Implement get_transform and set_transform for runtime-defined RNA properties.
Improve handling of runtime defined python RNA properties. Mainly:
* Add `get_transform` and `set_transform` new callbacks.
  These allow to edit the value, while still using the default
  (IDProperty-based) storage system.
* Read-only properties should now be defined using a new `options` flag,
  `READ_ONLY`.
* `get`/`set` should only be used when storing data outside of the
  default system now.
  * Having a `get` without a `set` defined forces property to be
    read-only (same behavior as before).
  * Having a `set` without a `get` is now an error.
* Just like with existing `get/set` callbacks, `get_/set_transform`
  callbacks must always generate values matching the constraints defined
  by their `bpy.props` property definition (same type, within required
  range, same dimensions/sizes for the `Vector` properties, etc.).
* To simplify handling of non-statically sized strings, the relevant
  RNA API has been modified, to use `std::string` instead of
  (allocated) char arrays.

Relevant unittests and benchmarking have been added or updated as part
of this project.

Note: From initial benchmarking, 'transform' versions of get/set are
several times faster than 'real' get/set.

Implements #141042.

Pull Request: https://projects.blender.org/blender/blender/pulls/141303
2025-09-02 11:30:09 +02:00
Jeroen Bakker
75c66158aa Vulkan: Precheck max allowed buffer size
Maintenance4 contains the maxBufferSize property that contains the
maximum allowed buffer allocation.

This PR uses this property to precheck if allocations will fail. It
was an attempt to improve the reliability of failing allocations but
currently they fail at the driver side.

Pull Request: https://projects.blender.org/blender/blender/pulls/145555
2025-09-02 10:57:24 +02:00
Christoph Lendenfeld
ec6dfeb806 Refactor: Remove unused function from UI_view_2d.hh
No functional changes intended.

This removes the unused function `UI_view2d_draw_scale_y__block`
and renames the functions that are `static` to follow the conventions.

Pull Request: https://projects.blender.org/blender/blender/pulls/145342
2025-09-02 09:54:04 +02:00
Jacques Lucke
97ee147f60 Fix: Nodes: wrong structure type inference in Blur Attribute node
The output of this node is always a field, regardless of whether the inputs are fields.
Therefore, using `dependent_field()` is wrong.

Pull Request: https://projects.blender.org/blender/blender/pulls/145548
2025-09-02 09:25:55 +02:00
Jacques Lucke
73b3107168 Fix: Nodes: incorrect structure types in Random Value node
This node is really just a function node. The main thing that's somewhat special about
it is the implicit input for the id, but that's supported for function nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/145549
2025-09-02 09:22:21 +02:00
Jeroen Bakker
42a8c695bf Fix #144636: EEVEE Invalid hit during raytracing
Raytracing pipeline in EEVEE interpolates in time for better results.
But depending on the interpolation could try to load a sample that isn't
available.

This PR fixies this for planar probes and screen tracing. In screen
tracing the issue wasn't visible as it the background samples are
always cleared.

This has an expected performance penalty but it could require an
overhaul of EEVEE raytracing for a more efficient solution.

Pull Request: https://projects.blender.org/blender/blender/pulls/145508
2025-09-02 07:49:16 +02:00
Brad Smith
c114a1f660 Build: resolve linking error on *BSD systems
Ref !144247
2025-09-02 04:04:20 +00:00
Campbell Barton
30837eca7c CLI: only show "--qos" on WIN32 2025-09-02 11:06:31 +10:00
Campbell Barton
c0aa455389 Correct define check for command line file-type registration
Mistake in [0] caused extension registration to be deferred on all
platforms, instead of non WIN32/APPLE systems.

[0]: 9cb3a17352
2025-09-02 11:01:01 +10:00
Campbell Barton
f3f50b2a4c Build: unbreak lite builds 2025-09-02 00:49:57 +00:00
Harley Acheson
4fccca3e45 Fix #145485: Don't Draw Panels When Hidden or Minimized
Don't draw panel contents when below a threshold, especially when
minimized to show only category tabs.

Pull Request: https://projects.blender.org/blender/blender/pulls/145543
2025-09-02 02:35:09 +02:00
Jacques Lucke
c51eb5b233 Refactor: Nodes: improve InferenceValue abstraction to better support non-primitive values
Currently, `InferenceValue` contains either a primitive value or is in the
"unknown" state. Previously, all code had the assumption that when the value is
not unknown, it is a primitive value. However, that may not be true anymore when
we support inferencing through e.g. bundles and closures as those are not
"primitive". This assumption is removed now, non-primitive values have not been
added yet though.

Pull Request: https://projects.blender.org/blender/blender/pulls/145532
2025-09-01 22:42:57 +02:00
Jacques Lucke
16a9bb1be7 UI: Nodes: gray out sockets in non-editable linked node trees
The goal is to make it more obvious when a node tree is linked (or packed in the future).

Pull Request: https://projects.blender.org/blender/blender/pulls/145387
2025-09-01 22:20:33 +02:00
Howard Trickey
38cb4ba232 Fix #145349: Manifold Boolean kills sharp on edge-vertex intersection.
The code to find output-to-input edge matching missed a case where
both vertices of the output edge existed in the input, but were in
different input meshes.
2025-09-01 16:07:14 -04:00
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