32c301e3cf4172b367c09c32edc2094e39f13649
This adds a function that can turn an existing `bNodeTree` into an inlined one. The new node tree has all node groups, repeat zones, closures and bundles inlined. So it's just a flat tree that ideally can be consumed easily by render engines. As part of the process, it also does constant folding. The goal is to support more advanced features from geometry nodes (repeat zones, etc.) in shader nodes which the evaluator is more limited because it has to be able to run on the GPU. Creating an inlined `bNodeTree` is likely the most direct way to get but may also be limiting in the future. Since this is a fairly local change, it's likely still worth it to support these features in all render engines without having to make their evaluators significantly more complex. Some limitations apply here that do not apply in Geometry Nodes. For example, the iterations count in a repeat zone has to be a constant after constant folding. There is also a `Test Inlining Shader Nodes` operator that creates the inlined tree and creates a group node for it. This is just for testing purposes. #145811 will make this functionality available to the Python API as well so that external renderers can use it too.
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline—modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
