Commit graph

87 commits

Author SHA1 Message Date
Criss-Ivana
2a704a6f0d Compositor: Port Bone Info node
This patch ports the Bone Info node to the Compositor.

Pull Request: https://projects.blender.org/blender/blender/pulls/162719
2026-08-20 07:44:11 +02:00
Criss-Ivana
65ce9dd801 Compositor: Port Import Text node
This patch ports the Import Text node to the Compositor.

Pull Request: https://projects.blender.org/blender/blender/pulls/162587
2026-08-20 07:38:05 +02:00
Jacques Lucke
216b62e05c Nodes: new Get Vector Component node
This adds a new simple node which retrieves the X, Y or Z component of a vector
by index. This is simpler and more efficient than using workarounds like using a
Separate XYZ with an Index Switch node.

The original motivation for this node came from #149091 where we wanted to
support this using expressions (`vector[i]`).

Co-authored-by: Tibo Stans <stanstibo@gmail.com>
2026-08-12 17:22:43 +02:00
Omar Emara
b2a937ef91 Compositor: Add support for Bundles
This patch adds support for Bundles in the compositor. This is mostly a
direct port of the Geometry Nodes code, except the compositor uses the
BundleItemInternalValueMixin mechanism for storing results in bundles.

The Result free function now resets the single value just like CPU/GPU
buffers since bundles are stored in the single value needs to be freed.

The Join Bundle and Get Nested Bundle Paths are not yet implemented
because they require lists.

Pull Request: https://projects.blender.org/blender/blender/pulls/162333
2026-08-11 11:30:55 +02:00
Criss-Ivana
55b4559e6b Compositor: Port Is Viewport node
This patch ports the Is Viewport node to the Compositor.

Pull Request: https://projects.blender.org/blender/blender/pulls/162243
2026-08-10 08:02:59 +02:00
Criss-Ivana
7bb4c56c40 Compositor: Port Random Value node
This patch ports the Random Value node into the compositor.

Pull Request: https://projects.blender.org/blender/blender/pulls/162120
2026-07-31 12:51:58 +02:00
Criss-Ivana
f09119ea5c Compositor: Port Hash Value node
This patch ports the Hash Value node into the compositor.

Pull Request: https://projects.blender.org/blender/blender/pulls/162054
2026-07-31 12:50:26 +02:00
Criss-Ivana
fae91bee18 Compositor: Port Integer Math node
This patch ports the Integer Math node to the compositor.

Pull Request: https://projects.blender.org/blender/blender/pulls/160924
2026-07-28 12:16:55 +02:00
Cristian Ivana
d8016f9acf Compositor: Port Combine/Separate Transform nodes
This patch adds support for the Combine/Separate Transform nodes in the
compositor. This basically implements the GPU material function for the
nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/161656
2026-07-23 13:38:34 +02:00
quackarooni
fc7cb3f5d0 Fix: Nodes: Various Add/Swap menu entries not in alphabetical order
Shader Nodes
- Split Bundle and Closure nodes in their own subsections.

Geometry Nodes
- Reorder certain nodes.
    - e.g. `Bone Info`, `Is Edge Smooth`, `Gamma`, `Implicit Conversion`
- Create subsection for tool-specific `Geometry > Read` nodes.
    - e.g. `Active Element`, `Selection`
- Create subsection for switch nodes.
- Split the Bundle menu into multiple subsections.

Compositor
- Reorder `Mask to SDF` & `Implicit Conversion`
- Create subsection for switch nodes.
- Make order of `Utilities` submenus consistent with Geometry Nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/154596
2026-07-10 16:49:07 +02:00
Cristian Ivana
d89c56e21a Compositor: Port Matrix SVD node
This patch implements the Matrix SVD for the compositor, which mostly
involves doing a GPU implementation for the node. The implementation
tries to match Eigen::JacobiSVD as much as possible for consistency
between CPU and GPU.

Pull Request: https://projects.blender.org/blender/blender/pulls/159891
2026-07-06 06:21:13 +02:00
Brecht Van Lommel
45b9e0fa05 Merge branch 'blender-v5.2-release' 2026-07-02 14:10:24 +02:00
quackarooni
a480c0a26f Fix: Compositor: Set String Case node missing in Add/Swap menu
This patch adds `Set String Case` to the Compositor Add/Swap menus.
When it was made, compositor functionality was already supported, but it
wasn't exposed in the menus.

No changes to the node's functionality have been made.

Pull Request: https://projects.blender.org/blender/blender/pulls/160940
2026-07-02 12:30:42 +02:00
Criss-Ivana
abd5481bb9 Compositor: Add Bit Math node
This patch adds the Bit Math node from Geometry Nodes to the
compositor.
2026-06-26 15:01:39 +02:00
Cristian Ivana
150fb0cccd Compositor: Port Float To Int node
This patch ports the Float to Int node from Geometry Nodes into the
Compositor.

Pull Request: https://projects.blender.org/blender/blender/pulls/160115
2026-06-15 11:16:01 +02:00
Cristian Ivana
19e0672d75 Compositor: Port Compare node
This path adds support for the Compare node from Geometry Nodes to the
compositor.

The node currently ignores alpha during color comparisons, and we might
want to change this to be more useful in the compositor in the future if
agreed by the Geometry Nodes module.

Pull Request: https://projects.blender.org/blender/blender/pulls/159653
2026-06-11 15:26:07 +02:00
Cristian Ivana
e233152491 Compositor: Port Boolean Math node
This patch ports the Boolean Math node to the Compositor. It also fixes
and issue with bool to color implicit conversion GPU to match CPU.

Pull Request: https://projects.blender.org/blender/blender/pulls/159333
2026-06-08 08:00:48 +02:00
Omar Emara
ca2588ada0 Compositor: Replace Switch node with Geometry Nodes'
This patch replaces the Switch node in the compositor with the Switch
node from Geometry Nodes. The node gained a new type input. The old node
was marked deprecated and will be removed in a future version.

Pull Request: https://projects.blender.org/blender/blender/pulls/158744
2026-05-20 16:01:57 +02:00
Omar Emara
5f2067df3e Compositor: Support Warning node
This patch adds support for the Warning node in the compositor, which
already exist in Geometry Nodes.

Partially resolves #144443.

Pull Request: https://projects.blender.org/blender/blender/pulls/158632
2026-05-15 13:59:11 +02:00
David Murmann
59e54526a2 Geometry Nodes: add Reverse String node
Add a Reverse String node, which reverses the given input string.

This could be done previously with a repeat zone, but a built-in
node is much more performant, for this somewhat common operation.

Pull Request: https://projects.blender.org/blender/blender/pulls/158387
2026-05-12 18:57:02 +02:00
Criss-Ivana
f1185c873b Compositor: Port rotation nodes from geometry nodes
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
2026-05-06 13:26:35 +02:00
Omar Emara
d5fa560cc8 Compositor: Add String To Image node
This patch adds a new String To Image node that generates a new image
with a text paragraph. This also adds the Font socket and Input Font
nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/155864
2026-04-17 14:05:21 +02:00
Omar Emara
a241422362 Compositor: Add string nodes
This patch exposes string nodes from Geometry nodes to the compositor.
This includes the Input String, Format String, Match String, Replace
String, Slice String, Trim String, Find In String, String Length, String
To Value, Value To String, and the Input Special Characters nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/153201
2026-04-17 13:33:51 +02:00
Habib Gahbiche
5dc6305602 Nodes: Defaults for Vector Math node depend on operation
Related to https://projects.blender.org/blender/blender/pulls/155879

Initialize Vector Math node with reasonable defaults depending on the
math operation.

### 1st and 2nd input defaults set to (1,1,1):
- Multiply
- Divide
- Power
- Modulo

### 1st set to (1,1,1), 2nd to (0,0,0):
- Subtract (`1 - x` is a common operation)

### 2nd set to (1,1,1), 3rd to (0,0,0):
- Multiply Add

Pull Request: https://projects.blender.org/blender/blender/pulls/156804
2026-04-08 12:35:03 +02:00
Omar Emara
815059977b Compositor: Add Object Info node
This patch ports the Object Info node from Geometry Nodes to the
compositor. Only the relevant inputs/outputs/options are available for
the compositor. The rotation output is not enabled for now, but will be
once !154845 lands.

Pull Request: https://projects.blender.org/blender/blender/pulls/156428
2026-03-31 12:30:08 +02:00
Habib Gahbiche
6355b3df1b Nodes: defaults for math node depending on operation
Follow-up to c01b317f14

Initialize new math node with reasonable defaults depending on the
operation.

## Defaults:
### 1st and 2nd input defaults to 1:
- Multiply
- Multiply Add
- Power
- Truncated modulo
- Floored modulo
- Modulo
- Artan2
### 1st and 2nd input defaults to 0:
- Add
### 1st input defaults to 1, 2nd to 0:
- Subtract (`1 - x` are more common for subtraction)
### 2nd input set to 1, 3rd input defaults to 0:
- Multiply Add

Pull Request: https://projects.blender.org/blender/blender/pulls/155879
2026-03-26 18:22:35 +01:00
Omar Emara
7548e4936a Compositor: Add Blank Image node
This patch adds a new Blank Image node. The node simply returns an image
with the given size and constant color. The primary use cases are
procedural generations, convolution and bokeh kernel generation, and
image concatenations.

Pull Request: https://projects.blender.org/blender/blender/pulls/155466
2026-03-25 12:18:39 +01:00
Omar Emara
e919a25441 Compositor: Port Input Object node
This patch ports the Input Object node from Geometry Nodes to the
compositor.

Pull Request: https://projects.blender.org/blender/blender/pulls/155779
2026-03-18 08:46:50 +01:00
Omar Emara
45d5533d8e Compositor: Port matrix math nodes
This patch ports the matrix math nodes that exist in Geometry Nodes to
the compositor. This is still missing the nodes that has rotation
sockets because they still do not exist in the compositor. The matrix
SVD node is not yet implemented either.

Pull Request: https://projects.blender.org/blender/blender/pulls/155630
2026-03-16 10:03:17 +01:00
Omar Emara
1d2ca9b15c Compositor: Port Active Camera and Camera Info nodes
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
2026-03-16 10:01:00 +01:00
Omar Emara
f49b33a081 Compositor: Support integer vector socket
This patch adds support for integer vectors sockets in the compositor,
no node makes use of it yet.

Pull Request: https://projects.blender.org/blender/blender/pulls/155246
2026-03-09 11:40:05 +01:00
Lukas Tönne
0eca88e118 Nodes: Add missing input nodes for constant values
Input "Constant" nodes for missing socket data types:
- `Font` ID data blocks
- `Menu` enum values

The Font input node is initialized with the default font, just like font
input sockets generally are.

Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/154318
2026-02-24 15:18:17 +01:00
Bastien Montagne
a9a68c1d44 Merge branch 'blender-v5.1-release' 2026-02-23 11:49:13 +01:00
Damien Picard
eda2edef74 I18n: Disambiguate "Constant"
- In the context of nodes, a constant value. This is a menu that
  existed already in Geometry Nodes, and was added recently in
  compositing.
- In the context of the Generated F-curve modifier, a constant value
  as a basis for a polynomial expression.

Reported by Satoshi Yamasaki in #43295.
2026-02-23 11:26:26 +01:00
Lukas Tönne
5b8b780ff7 Nodes: Type conversion node to force a specific data type
Simple generic type conversion nodes that implicitly convert the input
to a specific data type.

These nodes are conceptually similar to _Reroute_ nodes, except with a
fixed, selectable data type. They can be useful for forcing a node
socket to be converted to a given data type, instead of just relying on
the source and target types. This will be needed for improving the
_ungroup_ operator, which can then preserve the behavior of the
original node group interface sockets (#151432).

Pull Request: https://projects.blender.org/blender/blender/pulls/154497
2026-02-18 12:27:39 +01:00
Omar Emara
32d6bfc11a Compositor: Add Boolean, Integer, and Vector input nodes
Pull Request: https://projects.blender.org/blender/blender/pulls/153194
2026-01-22 15:27:56 +01:00
Omar Emara
ee637f2098 Compositor: Add Mask To SDF node
This patch adds a new Mask To SDF node. The node takes in a mask and
performs an euclidean distance transform to compute the distance to the
nearest mask boundary pixel. The distance is negative inside the mask.
The node also returns the integer coordinates of the nearest mask
boundary pixels.

Pull Request: https://projects.blender.org/blender/blender/pulls/140213
2026-01-09 12:02:45 +01:00
quackarooni
c0bc6af654 Fix: Nodes: Various menu entries not in alphabetical order
Re-order menu items and/or add a separator between each group such that
everything follows an alphabetical order.

Pull Request: https://projects.blender.org/blender/blender/pulls/150567
2025-11-28 15:46:28 +01:00
Eqkoss / T1NT1N
33d8d2b6f2 Compositor: Support Index Switch node
This patch adds support for the Index Switch node in the compositor.

Pull Request: https://projects.blender.org/blender/blender/pulls/147889
2025-10-23 08:22:27 +02:00
Ramon Klauck
a420f5974a Compositor: Add Sequencer Strip Info node
This patch adds a new Sequencer Strip Info node to the compositor. The
node returns information about the strip that the compositor modifier is
applied on, like the Start and End frames as well as its transform. This
node is only supported in the context of the sequencer and will return
default values otherwise.

Pull Request: https://projects.blender.org/blender/blender/pulls/147855
2025-10-23 08:20:59 +02:00
Omar Emara
722310342f Compositor: Support Radial Tilling node
This patch adds support for the Radial Tilling node in the compositor.
The node already existed in the compositor, but it immediately crashed
Blender, so we dropped support for it in 5841cb21f7 until proper support
is added.

Support was added in 5517941a60, 97e3fb0e03, a2146839d7, and df8683ec2a.
So we now enable it again by reverting 5841cb21f7.

Pull Request: https://projects.blender.org/blender/blender/pulls/148056
2025-10-15 12:01:20 +02:00
Campbell Barton
7a249222be Cleanup: tweak multi-line parenthesis for Python scripts
Reduce right shift, moving closing parenthesis onto own line
for clarity & reducing diff noise in some cases.

Ref !147857
2025-10-12 03:31:31 +00:00
Omar Emara
5841cb21f7 Fix #146759: Radial Tilling node crashes in the compositor
The Radial Tilling node crashes in the compositor in GPU mode. This is
because the compositor does not yet support 2D vectors in shader code
generation, but properly supports and expects them in the interface,
which the Radial Tilling node declares. This results in a bad shader
which crashes Blender.

To properly fix this, we need to:

- Support 2D vectors in compositor GPU material shader code generation.
- Support 2D vectors in shader node GPU stack construction.
- Adjust the interface of radial tilling to actually use 2D vectors.

This seems risky for 5.0, so this patch temporarily drops support for
the node in the compositor in 5.0. Then once 2D vectors are supported,
it can be enabled again.

Pull Request: https://projects.blender.org/blender/blender/pulls/147627
2025-10-09 17:23:12 +02:00
Campbell Barton
cc1a3f19b4 Cleanup: resolve various pylint warnings from recent changes 2025-10-07 10:19:46 +11:00
W_Cloud
247c19f6cf Fix #147355: Nodes: Inconsistent vector add menu
- Add the missing `Vector Math` node to the Compositor add menu.
- Adjust the position of the `Separate XYZ` node in Geometry Nodes.
- Adjust the position of the `Vector Math` node in Shader Nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/147435
2025-10-06 19:09:01 +02:00
Habib Gahbiche
5e0b244066 Nodes: Unify add menus
The general idea is to order all menus as:
```
Common categories
(e.g. Input/output)
---
Specific categories
---
Assets
--
Common categories
(e.g. Group/Layout)
```

## Changes:
### Compositor
- Removed Color/Mix submenu
- Moved Vector to Utilities
- New Category: "Creative". This is where most new assets will fit in.
- Moved to Creative:
	- Kuwahara
    - Pixelate
    - Posterize

### Geo Nodes
- Moved 'Vector' to 'Utilities'
- Moved 'Attribute' before 'Geometry'
- Moved 'Material' to 'Geometry'
- Moved 'Color' to top level, grouped with Utilities

### Shader
- Moved 'Vector' to 'Utilities'
- Deleted 'Converter'
- New 'Displacement' menu
- Grouped 'Color' with Utilities (remains top level)

Ref: https://devtalk.blender.org/t/2025-09-05-design-session-node-groups-different-editors/42244
Pull Request: https://projects.blender.org/blender/blender/pulls/146806
2025-10-02 11:07:25 +02:00
Jacques Lucke
b186e60759 Nodes: support node output visibility inferencing
Currently, only the visibility of input sockets can be changed dynamically based
on other menu inputs. However, under some circumstances, it can also be useful
to hide certain outputs. For example, the built-in Curve Arc primitive node does
that.

This patch adds support for automatic detection of unused outputs. How to detect
unused outputs is less straight forward compared to inputs. This patch uses the
rule that an output is unused if it always outputs a "fallback value" (typically
0) irrespective of the currently used inputs. If the output is independent of
all inputs, it stays visible though.

There is a new small utility node called "Enable Output". It replaces a value
with it's fallback value unless it is disabled. This simplifies setting up
unused outputs. In theory, a normal switch node can also be used, but that is
less usable and the user will have to hardcode the fallback value for each type
which is not something that is explicitly exposed yet.

Supporting dynamic output visibility is also a prerequisite for exposing some
menu node options as sockets (e.g. in the Arc node).

Pull Request: https://projects.blender.org/blender/blender/pulls/140856
2025-09-27 10:09:48 +02:00
Omar Emara
73fcbaf7c4 VSE: Add Compositor modifier
This patch adds a new Compositor modifier that applies a compositing
node group on a sequencer strip. This patch also introduces the concept
of a compositor node tree space subtype, where we now have a Scene and a
Sequencer subtypes. Practically, this just means that node like the
Render Layers node will not be available in the node editor in the
Sequencer subtype.

Future improvements includes:

- The compositor context is recreated on every modifier application,
  while it should ideally be persistent somehow to make use of the
  compositor static cache. This might require work from the compositor
  side by moving the static cache outside of the context and make it
  thread safe if needed. See `Render.compositor` for an example on
  persistent context.
- GPU execution is not supported. This just needs a GPU context to be
  bound before execution, but the tricky part is getting a GPU context.
  See `render::Compositor::execute` for an example on bounding a GPU
  context and why it is less straight forward.
- Node inputs are not exposed on the sequencer modifier interface. An
  approach similar to Geometry Nodes modifier could be used, look at
  `update_input_properties_from_node_tree` for reference, but notice
  that Geometry Nodes naturally exempt the main Geometry socket because
  Geometry inputs can't be exposed, but for the compositor, we will have
  to exempt the main Color and Mask sockets manually. !145971

Co-authored-by: Aras Pranckevicius <aras@nesnausk.org>
Co-authored-by: Falk David <falk@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/139634
2025-09-26 08:40:42 +02:00
Campbell Barton
b4fbc0c32d Cleanup: remove f-strings use, use double quotes, quiet pylint warnings 2025-09-26 14:31:05 +10:00
quackarooni
2a1a658492 Nodes: Swap Node Operator
Implement a native method to swap between different node and zone types.

This implementation repurposes the existing menu definitions as base
classes, from which both an "Add" and a "Swap" version would be generated
from. This allows both menus to have the same layout, but use their own
operators for handling the different node/zone types.

In this PR, support for all node editors has been implemented.

Invoking the menu is currently bound to `Shift + S`, same as the old
implementation in Node Wrangler. Since "Swap" is implemented as a
regular menu, features that menus already have such as type-to-search
and adding to Quick Favorites don't require any extra caveats to
consider.

Resolves #133452

Pull Request: https://projects.blender.org/blender/blender/pulls/143997
2025-09-25 16:12:02 +02:00