f7c0ef1f733a252a055e3b4be3bb7de31dd091a5
The goal is to be able to define a node in as few files as possible. Currently, RNA definitions for nodes are put in `rna_nodetree.cc`. However, it seems surprisingly simple to move them from there to the node files. Of course this means that `makesrna.cc` won't generate these properties and their accessor functions anymore. Fortunately, C++ lambdas and the preprocessor make it fairly straight forward to generate those without the `makesrna` preprocessor. Using the preprocessor here is not great of course, but I'd argue that it feels less magical than it was before, so it's an improvement. This patch changes a few files to test the feasibility of this approach. Eventually, this approach should be used by all nodes. It can't be used for shader nodes for now, because cycles still relies on the C++ API generated by RNA. Right now, only properties are defined the node files. The `StructRNA` is still generated by `makesrna`. It seems feasible to generate it at runtime as well though with potentially minor RNA API changes. This is related to #75724. Pull Request: https://projects.blender.org/blender/blender/pulls/110840
…
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%
