diff options
author | Aaron Carlisle <Blendify> | 2021-12-06 01:46:45 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2021-12-06 01:47:33 +0300 |
commit | 3f7014ecc9d523997062eadd62888af5fc70a2b6 (patch) | |
tree | d084b014e9b116d2ab579f54c332dd49c311828c /source/blender/editors/space_view3d | |
parent | 0a8a22fc04d3475d2c5f41f2e022c8e28d099520 (diff) |
Shader Nodes: Declare nodes in their own namespace
Follow up on rB1df8abff257030ba79bc23dc321f35494f4d91c5
This puts all static functions in geometry node files into a new
namespace. This allows using unity build which can improve
compile times significantly
- The namespace name is derived from the file name.
That makes it possible to write some tooling that checks the names later on.
The filename extension (cc) is added to the namespace name as well.
This also possibly simplifies tooling but also makes it more obvious that this namespace is specific to a file.
- In the register function of every node, I added a namespace alias namespace `file_ns = blender::nodes::node_shader_*_cc`;.
This avoids some duplication of the file name and may also simplify tooling, because this line is easy to detect.
The name `file_ns` stands for "file namespace" and also indicates that this namespace corresponds to the current file.
In the future some nodes will be split up to separate files and given their own namespace
This will allow function names to be simplified similar to rBfab39440e94
Reviewed By: HooglyBoogly
Differential Revision: https://developer.blender.org/D13480
Diffstat (limited to 'source/blender/editors/space_view3d')
0 files changed, 0 insertions, 0 deletions