This adds improved support for string sockets in shader nodes.
Before, strings were in a bit of a weird state: two nodes (Principled Volume and
Raycast) have string inputs but string sockets were not even allowed based on
`shader_node_tree_socket_type_valid`. I wanted to try to add string sockets
there in #118984 but it didn't really work well back then.
Now, with the shader nodes inlining, we can more easily support string sockets
because their evaluation is entirely handled at the inliner level. The final
strings just end up in the string inputs of the two mentioned nodes (and maybe
more in the future).
Improved string socket support also helps with the expression node (#149091)
since expressions are strings too.
This patch also makes various string nodes from Geometry Nodes and the
Compositor available in shader nodes to: Find in String, Format String, Special
Characters, Input String, Match String, Replace String, Reverse String, Set
String Case, Slice String, String Length, String to value, Trim String, Value to
String. This is basically the same set as was added in #155864 to the compositor
+ nodes that were added since then.
There are not that many use-cases for strings in shader nodes yet, but the
unification is nice and will probably become more useful over time.
The most difficult challenge here was dealing with
`should_preserve_repeat_zone_node`. The old logic just based on the socket types
was not enough anymore when there are nodes which only the inliner can evaluate
but not the renderers. The tricky thing is that it seems hard to impossible to
100% accurately detect whether a repeat zone can be preserved without trying
(especially when nested bundles/closures are passed into the repeat zone to be
expanded inside of it). The best solution I came up with so far is attempting to
preserve the repeat zone first and then having the option to backtrack that
decision and to end up inlining it when preserving it failed.
Pull Request: https://projects.blender.org/blender/blender/pulls/162643
This patch adds support for Rotation sockets as well as existing nodes
from Geometry Nodes. This includes the Rotate Vector, Invert Rotation,
Rotation to Euler, Euler to Rotation, Rotate Rotation, Rotation to Axis
Angle, Axis Angle to Rotation, Mix Rotation, Rotation to Quaternion,
Quaternion to Rotation, Align Rotation to Vector, and Axes to Rotation
nodes.
Pull Request: https://projects.blender.org/blender/blender/pulls/154845
This patch makes the Active Camera and Camera Info nodes from Geometry
nodes available in the compositor. This also exposed the object socket
as the first user for it.
Pull Request: https://projects.blender.org/blender/blender/pulls/155616
If the item to be copied is not within the target interface tree, this PR now
adds the item to the end of the interface instead of performing a NOOP.
Co-authored-by: Lukas Tönne <lukas@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/151567
Extend node group tests to cover change of subtype and dimensions
The node group interface tests did not include changes to socket subtypes and/or
vector dimension details. These settings affect the RNA struct type of the
socket and the size of default value arrays.
The change of subtype details has the unfortunate effect of invalidating any
existing python object representing the interface socket or node socket. This
isn't easy to fix, but the test now covers this expected behavior.
Pull Request: https://projects.blender.org/blender/blender/pulls/153254
This commit includes new minimum compiler requirements for Blender 5.1 as well as updated and new libraries.
**New compiler requirements**
* Windows x64: Visual Studio 2022 (17.14.14 or newer)
* Windows arm64: Visual Studio 2022 (17.14.23 or newer)
* Linux x64: gcc 14 (when used with our libraries)
**New libraries**
Abseil 20250814.1
ThorVG 1.0.0-pre31
OpenJPH 0.25.2
**Updated libraries**
AOM 3.13.1
Expat 2.7.2
FFI 3.5.2
HIPRT 606b4886efabce918dd0634ef71c06615a47c83b
Imath 3.2.2
ISPC 1.29.1
libheif 1.20.2
MaterialX 1.39.4
MESON 1.9.0
minizip-ng 4.0.10
Numpy 2.3.4
oneAPI Level Zero 1.21.9
OneTBB 2022.3.0
OpenColorIO 2.5.0
OpenEXR 3.4.3
OpenImageDenoise 2.4.1
OpenImageIO 3.1.7
OpenSubDiv 3.7.0
OpenVDB 13.0.0
OpenXR 1.1.53
PIP 25.2
Python 3.13.9
ShaderC 2025.4
Vulkan 1.4.328
webp 1.6.0
Yaml CPP 0.8.0
ZSTD 1.5.7 (z-standard 0.25.0)
**Library changes**
FMT (moved from /extern to libs)
Ceres (updated version in lib, will be removed from /extern in a later commit)
Eigen (updated version in lib, will be removed from /extern in a later commit))
Ref #147201
Co-authored-by: Nikita Sirgienko <nikita.sirgienko@intel.com>
Co-authored-by: Ray Molenkamp <github@lazydodo.com>
Co-authored-by: Sebastian Parborg <sebastian@blender.org>
Co-authored-by: Anthony Roberts <anthony.roberts@linaro.org>
Co-authored-by: Jonas Holzman <jonas@holzman.fr>
Co-authored-by: Bart van der Braak <bart@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/149852
"Use Nodes" was removed in the compositor to simplify the compositing
workflow. This introduced a slight inconsistency with the Shader Node
Editor.
This PR removes "Use Nodes" for object materials.
For Line Style, no changes are planned (not sure how to preserve
compatibility yet).
This simplifies the state of objects; either they have a material or
they don't.
Backward compatibility:
- If Use Nodes is turned Off, new nodes are added to the node tree to
simulate the same material:
- DNA: Only `use_nodes` is marked deprecated
- Python API:
- `material.use_nodes` is marked deprecated and will be removed in
6.0. Reading it always returns `True` and setting it has no effect.
- `material.diffuse_color`, `material.specular` etc.. Are not used by
EEVEE anymore but are kept because they are used by Workbench.
Forward compatibility:
Always enable 'Use Nodes' when writing blend files.
Known Issues:
Some UI tests are failing on macOS
Pull Request: https://projects.blender.org/blender/blender/pulls/141278
Changing a node tree item property (such as the default value) was using a very
broad and generic "tag" function which invalidates the runtime items cache.
This also invalidates any python iterators due to the API using the runtime
cache. Changing node tree items in a loop will then crash.
It's not necessary to invalidate the runtime items cache when the actual item
pointers have not changed. Most RNA updates only change superficial properties,
or at most require a recursive node tree update due to change of identifiers or
types.
This PR introduces a simpler "tag" function to only tag for tree updates by not
rebuild the entire runtime items cache. It also renames existing functions and
docstrings to better explain what each of them does and should be used for.
The `NodeTreeInterfaceChangedFlag` is removed completely because it is only ever
used as a simple boolean indicator of "item changes" that require a cache
rebuild. It is replaced with an atomic bool like flags used for runtime caches.
Pull Request: https://projects.blender.org/blender/blender/pulls/143932
Use Nodes were removed in d88d4cc8 from the UI, but marked deprecated
in Python API. Since we decided to remove `world.use_nodes` and
`material.use_nodes` for the shader editor (instead of deprecating
them), we also remove `scene.use_nodes`.
This PR only replaces the deprecated `scene.node_tree` with
`scene.compositing_node_group` where necessary. #143619 will fully
remove `node_tree`
Pull Request: https://projects.blender.org/blender/blender/pulls/143578
This patch adds support for boolean sockets in the compositor. This
involves adding a new Bool ResultType and handling it in relevant code.
For shader operations, booleans are passes as floats since GPUMaterial
does not yet support boolean types.
Pull Request: https://projects.blender.org/blender/blender/pulls/136296
This patch adds support for using integer sockets in compositor nodes.
This involves updating the Result class, node tree compiler, implicit
conversion operation, multi-function procedure operation, shader
operation, and some operations that supports multiple types.
Shader operation internally treats integers as floats, doing conversion
to and from int when reading and writing. That's because the GPUMaterial
compiler doesn't support integers. This is also the same workaround used
by the shader system. Though the GPU module are eyeing adding support
for integers, so we will update the code once they do that.
Domain realization is not yet supported for integer types, but this is
an internal limitation so far, as we do not plan to add nodes that
outputs integers soon. We are not yet sure how realization should happen
with regards to interpolation and we do not have base functions to
sample integer images, that's why I decided to delay its implementation
when it is actually needed.
Pull Request: https://projects.blender.org/blender/blender/pulls/132599
Nested panels are not supported currently, and this parameter serves no
actual purposes. Only the root panel supports adding child panels and it
is not user-accessible (adding the root panel is done using a nullptr
for the parent).
Pull Request: https://projects.blender.org/blender/blender/pulls/118792
Inlined sockets in the same vertical space are no longer supported.
This removes `input_output` socket declarations, the inlining feature in
node drawing, and the `Both` option for node group interface sockets.
Versioning code splits existing node group sockets into individual
sockets again. Unfortunately some links may get lost in versioning files
using the feature, because of an unnoticed bug: Socket identifiers have
to be unique in the node group items list but inlined input/output
sockets have the same identifier. This still works for most situations
because uniqueness is only required within input/output lists. Creating
proper unique identifiers will discard any link from the previous output
socket. This cannot easily be fixed without `after_linking` versioning
code, which should be avoided.
Pull Request: https://projects.blender.org/blender/blender/pulls/112560
Part 3/3 of #109135, #110272
Switch to new node group interfaces and deprecate old DNA and API.
This completes support for panels in node drawing and in node group
interface declarations in particular.
The new node group interface DNA and RNA code has been added in parts
1 and 2 (#110885, #110952) but has not be enabled yet. This commit
completes the integration by
* enabling the new RNA API
* using the new API in UI
* read/write new interfaces from blend files
* add versioning for backward compatibility
* add forward-compatible writing code to reconstruct old interfaces
All places accessing node group interface declarations should now be
using the new API. A runtime cache has been added that allows simple
linear access to socket inputs and outputs even when a panel hierarchy
is used.
Old DNA has been deprecated and should only be accessed for versioning
(inputs/outputs renamed to inputs_legacy/outputs_legacy to catch
errors). Versioning code ensures both backward and forward
compatibility of existing files.
The API for old interfaces is removed. The new API is very similar but
is defined on the `ntree.interface` instead of the `ntree` directly.
Breaking change notifications and detailed instructions for migrating
will be added.
A python test has been added for the node group API functions. This
includes new functionality such as creating panels and moving items
between different levels.
This patch does not yet contain panel representations in the modifier
UI. This has been tested in a separate branch and will be added with a
later PR (#108565).
Pull Request: https://projects.blender.org/blender/blender/pulls/111348