Cycles: Make all #include statements relative to cycles source directory
ClosedPublic

Authored by Sergey Sharybin (sergey) on Mar 28 2017, 8:45 PM.

Details

Summary

The idea is to make include statements more explicit and obvious where the
file is coming from, additionally reducing chance of wrong header being
picked up.

For example, it was not obvious whether bvh.h was refferring to builder
or traversal, whenter node.h is a generic graph node or a shader node
and cases like that.

Surely this might look obvious for the active developers, but after some
time of not touching the code it becomes less obvious where file is coming
from.

This was briefly mentioned in T50824 and seems @Brecht Van Lommel (brecht) is fine with such
explicitness, but need to agree with all active developers before committing
this.

Please note that this patch is lacking changes related on GPU/OpenCL
support. This will be solved if/when we all agree this is a good idea to move
forward.

Diff Detail

Repository
rB Blender

I don't see an issue with this approach, fine with it.

This revision is now accepted and ready to land.Mar 28 2017, 8:50 PM

I'm definitely in favor of that change.

While usually file name prefixes make it obvious, there indeed are a few cases where the added information helps readability and name conflicts are avoided.

Also, since only file headers are changed, I don't expext this change to cause any significant merge/rebase conflicts despite its size.

Im fine with this too.

Support OpenCL and CUDA

This is also very useful for 3rd party integrations. I've been in a situation before where there were two headers called node.h in the header search path.

This revision was automatically updated to reflect the committed changes.