This puts the all static functions in geometry node files into a new name space. This allows using unity builds which can improve compile times significantly (P2578).
- The name space name is derived from the file name. That makes it possible to write some tooling that checks the names later on. The file name 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_geo_*_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 beginning I used node_ns but file_ns is more generic which may make it more suitable when we want to use unity builds outside of the nodes modules in the future.
- Some node files contain code that is actually shared between different nodes. For now I left that code in the blender::nodes namespace and moved it to the top of the file (couldn't move it to the bottom in all cases, so I just moved it to the top everywhere). As a separate cleanup step, this shared code should actually be moved to a separate file.