diff --git a/scripts/sortincludes.py b/scripts/sortincludes.py index bb3a8aa8fa..67665630a6 100644 --- a/scripts/sortincludes.py +++ b/scripts/sortincludes.py @@ -32,6 +32,21 @@ import sys +#-------------------------------------------------------------------------------------------------- +# Utility functions. +#-------------------------------------------------------------------------------------------------- + +def walk(directory, recursive): + if recursive: + for dirpath, dirnames, filenames in os.walk(directory): + for filename in filenames: + yield os.path.join(dirpath, filename) + else: + dirpath, dirnames, filenames = os.walk(directory).next() + for filename in filenames: + yield os.path.join(dirpath, filename) + + #-------------------------------------------------------------------------------------------------- # Processing code. #-------------------------------------------------------------------------------------------------- @@ -52,7 +67,7 @@ def process_file(filepath): if section_begin != -1 and line in ["\n", "\r\n"]: if all(clause.startswith("#include") for clause in lines[section_begin:index]): - lines[section_begin:index] = sorted(lines[section_begin:index]) + lines[section_begin:index] = sorted(lines[section_begin:index], key=lambda s: s.lower()) section_begin = -1 with open(filepath + ".processed", "wt") as f: @@ -61,13 +76,6 @@ def process_file(filepath): os.remove(filepath) os.rename(filepath + ".processed", filepath) - -def process_recursively(): - for dirpath, dirnames, filenames in os.walk("."): - for filename in filenames: - ext = os.path.splitext(filename)[1] - if ext == ".h" or ext == ".cpp": - process_file(os.path.join(dirpath, filename)) #-------------------------------------------------------------------------------------------------- @@ -78,19 +86,16 @@ def main(): parser = argparse.ArgumentParser(description="sort #include clauses in c++ source code.") parser.add_argument("-r", "--recursive", action='store_true', dest='recursive', help="process all files in the specified directory and all its subdirectories") - parser.add_argument("filepath", nargs="?", help="file to process") + parser.add_argument("path", help="file or directory to process") args = parser.parse_args() - if args.filepath: - if args.recursive: - print("cannot simultaneously specify a file path and use the --recursive flag.") - sys.exit(1) - print(args.filepath) + if os.path.isfile(args.path): + process_file(args.path) else: - if not args.recursive: - print("either a file path or the --recursive flag must be specified.") - sys.exit(1) - process_recursively() + for filepath in walk(args.path, args.recursive): + ext = os.path.splitext(filepath)[1] + if ext == ".h" or ext == ".cpp": + process_file(filepath) if __name__ == '__main__': main() diff --git a/src/appleseed.python/bindshadergroup.cpp b/src/appleseed.python/bindshadergroup.cpp index 00f9e0a5d8..4324654826 100644 --- a/src/appleseed.python/bindshadergroup.cpp +++ b/src/appleseed.python/bindshadergroup.cpp @@ -36,8 +36,8 @@ #include "renderer/api/shadergroup.h" // appleseed.foundation headers. -#include "foundation/utility/autoreleaseptr.h" #include "foundation/utility/api/specializedapiarrays.h" +#include "foundation/utility/autoreleaseptr.h" #include "foundation/utility/searchpaths.h" // Standard headers. diff --git a/src/appleseed.python/bindtexture.cpp b/src/appleseed.python/bindtexture.cpp index 98f057e995..0733cc4b8c 100644 --- a/src/appleseed.python/bindtexture.cpp +++ b/src/appleseed.python/bindtexture.cpp @@ -35,8 +35,8 @@ #include "unalignedtransform.h" // appleseed.renderer headers. -#include "renderer/api/texture.h" #include "renderer/api/scene.h" +#include "renderer/api/texture.h" // appleseed.foundation headers. #include "foundation/utility/searchpaths.h" diff --git a/src/appleseed.python/dict2dict.cpp b/src/appleseed.python/dict2dict.cpp index 46f894c03a..48a2b91d89 100644 --- a/src/appleseed.python/dict2dict.cpp +++ b/src/appleseed.python/dict2dict.cpp @@ -35,8 +35,8 @@ // appleseed.foundation headers. #include "foundation/math/vector.h" -#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/api/specializedapiarrays.h" +#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/foreach.h" #include "foundation/utility/iostreamop.h" #include "foundation/utility/string.h" diff --git a/src/appleseed.python/metadata.h b/src/appleseed.python/metadata.h index 8c56d64725..78252a317d 100644 --- a/src/appleseed.python/metadata.h +++ b/src/appleseed.python/metadata.h @@ -34,8 +34,8 @@ #include "dict2dict.h" // appleseed.foundation headers. -#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/api/specializedapiarrays.h" +#include "foundation/utility/containers/dictionary.h" namespace detail { diff --git a/src/appleseed.studio/mainwindow/mainwindow.cpp b/src/appleseed.studio/mainwindow/mainwindow.cpp index 4e941f2b5c..78da602486 100644 --- a/src/appleseed.studio/mainwindow/mainwindow.cpp +++ b/src/appleseed.studio/mainwindow/mainwindow.cpp @@ -35,10 +35,10 @@ // appleseed.studio headers. #include "help/about/aboutwindow.h" -#include "mainwindow/project/attributeeditor.h" -#include "mainwindow/project/projectexplorer.h" #include "mainwindow/logwidget.h" #include "mainwindow/minimizebutton.h" +#include "mainwindow/project/attributeeditor.h" +#include "mainwindow/project/projectexplorer.h" #include "utility/interop.h" #include "utility/miscellaneous.h" #include "utility/settingskeys.h" diff --git a/src/appleseed.studio/mainwindow/mainwindow.h b/src/appleseed.studio/mainwindow/mainwindow.h index dcb8a7c9ea..3baa58e05b 100644 --- a/src/appleseed.studio/mainwindow/mainwindow.h +++ b/src/appleseed.studio/mainwindow/mainwindow.h @@ -34,9 +34,9 @@ #include "debug/benchmarks/benchmarkwindow.h" #include "debug/tests/testwindow.h" #include "mainwindow/project/projectmanager.h" +#include "mainwindow/qtlogtarget.h" #include "mainwindow/rendering/renderingmanager.h" #include "mainwindow/rendering/rendertab.h" -#include "mainwindow/qtlogtarget.h" #include "mainwindow/renderingsettingswindow.h" #include "mainwindow/statusbar.h" diff --git a/src/appleseed.studio/mainwindow/project/disneymaterialcustomui.cpp b/src/appleseed.studio/mainwindow/project/disneymaterialcustomui.cpp index 27480eeb8d..ae5e9b5428 100644 --- a/src/appleseed.studio/mainwindow/project/disneymaterialcustomui.cpp +++ b/src/appleseed.studio/mainwindow/project/disneymaterialcustomui.cpp @@ -36,8 +36,8 @@ #include "renderer/api/material.h" // appleseed.foundation headers. -#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/api/specializedapiarrays.h" +#include "foundation/utility/containers/dictionary.h" // Qt headers. #include diff --git a/src/appleseed.studio/mainwindow/project/entityeditorformfactorybase.cpp b/src/appleseed.studio/mainwindow/project/entityeditorformfactorybase.cpp index 0d310c9504..ad6baf8386 100644 --- a/src/appleseed.studio/mainwindow/project/entityeditorformfactorybase.cpp +++ b/src/appleseed.studio/mainwindow/project/entityeditorformfactorybase.cpp @@ -31,8 +31,8 @@ #include "entityeditorformfactorybase.h" // appleseed.foundation headers. -#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/api/specializedapiarrays.h" +#include "foundation/utility/containers/dictionary.h" // Standard headers. #include diff --git a/src/appleseed.studio/mainwindow/project/objectcollectionitem.cpp b/src/appleseed.studio/mainwindow/project/objectcollectionitem.cpp index 54b2f01dd7..4ac9860fec 100644 --- a/src/appleseed.studio/mainwindow/project/objectcollectionitem.cpp +++ b/src/appleseed.studio/mainwindow/project/objectcollectionitem.cpp @@ -45,8 +45,8 @@ // appleseed.foundation headers. #include "foundation/math/transform.h" -#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/autoreleaseptr.h" +#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/searchpaths.h" #include "foundation/utility/uid.h" diff --git a/src/appleseed.studio/mainwindow/project/projectbuilder.h b/src/appleseed.studio/mainwindow/project/projectbuilder.h index 249475edf3..0f73a2968b 100644 --- a/src/appleseed.studio/mainwindow/project/projectbuilder.h +++ b/src/appleseed.studio/mainwindow/project/projectbuilder.h @@ -54,8 +54,8 @@ // appleseed.foundation headers. #include "foundation/core/concepts/noncopyable.h" #include "foundation/math/transform.h" -#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/autoreleaseptr.h" +#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/uid.h" // Qt headers. diff --git a/src/appleseed.studio/mainwindow/rendering/renderingmanager.cpp b/src/appleseed.studio/mainwindow/rendering/renderingmanager.cpp index e03061322e..8871452c19 100644 --- a/src/appleseed.studio/mainwindow/rendering/renderingmanager.cpp +++ b/src/appleseed.studio/mainwindow/rendering/renderingmanager.cpp @@ -51,8 +51,8 @@ #include "foundation/image/image.h" #include "foundation/platform/defaulttimers.h" #include "foundation/platform/types.h" -#include "foundation/utility/job/iabortswitch.h" #include "foundation/utility/foreach.h" +#include "foundation/utility/job/iabortswitch.h" #include "foundation/utility/string.h" // Boost headers. diff --git a/src/appleseed.studio/mainwindow/rendering/renderingmanager.h b/src/appleseed.studio/mainwindow/rendering/renderingmanager.h index 186ae59435..aebfcf4330 100644 --- a/src/appleseed.studio/mainwindow/rendering/renderingmanager.h +++ b/src/appleseed.studio/mainwindow/rendering/renderingmanager.h @@ -44,8 +44,8 @@ // appleseed.foundation headers. #include "foundation/math/transform.h" #include "foundation/platform/thread.h" -#include "foundation/utility/job/abortswitch.h" #include "foundation/utility/autoreleaseptr.h" +#include "foundation/utility/job/abortswitch.h" // Qt headers. #include diff --git a/src/appleseed.studio/mainwindow/renderingsettingswindow.cpp b/src/appleseed.studio/mainwindow/renderingsettingswindow.cpp index c44e689c3e..92e9e892df 100644 --- a/src/appleseed.studio/mainwindow/renderingsettingswindow.cpp +++ b/src/appleseed.studio/mainwindow/renderingsettingswindow.cpp @@ -34,8 +34,8 @@ #include "ui_renderingsettingswindow.h" // appleseed.studio headers. -#include "mainwindow/project/projectmanager.h" #include "mainwindow/configurationmanagerwindow.h" +#include "mainwindow/project/projectmanager.h" #include "utility/foldablepanelwidget.h" #include "utility/inputwidgetproxies.h" #include "utility/miscellaneous.h" diff --git a/src/appleseed.studio/utility/widgetzoomhandler.cpp b/src/appleseed.studio/utility/widgetzoomhandler.cpp index efd4e2e9bb..f8f0353a32 100644 --- a/src/appleseed.studio/utility/widgetzoomhandler.cpp +++ b/src/appleseed.studio/utility/widgetzoomhandler.cpp @@ -39,8 +39,8 @@ #include #include #include -#include #include +#include // Standard headers. #include diff --git a/src/appleseed/foundation/math/bsp/bsp_tree.h b/src/appleseed/foundation/math/bsp/bsp_tree.h index 4020da04f6..b864c7ce1f 100644 --- a/src/appleseed/foundation/math/bsp/bsp_tree.h +++ b/src/appleseed/foundation/math/bsp/bsp_tree.h @@ -32,8 +32,8 @@ // appleseed.foundation headers. #include "foundation/core/concepts/noncopyable.h" -#include "foundation/math/bsp/bsp_node.h" #include "foundation/math/aabb.h" +#include "foundation/math/bsp/bsp_node.h" // Standard headers. #include diff --git a/src/appleseed/foundation/math/bvh/bvh_sbvhpartitioner.h b/src/appleseed/foundation/math/bvh/bvh_sbvhpartitioner.h index d275499430..7e2b8b644a 100644 --- a/src/appleseed/foundation/math/bvh/bvh_sbvhpartitioner.h +++ b/src/appleseed/foundation/math/bvh/bvh_sbvhpartitioner.h @@ -32,8 +32,8 @@ // appleseed.foundation headers. #include "foundation/core/concepts/noncopyable.h" -#include "foundation/math/bvh/bvh_bboxsortpredicate.h" #include "foundation/math/aabb.h" +#include "foundation/math/bvh/bvh_bboxsortpredicate.h" #include "foundation/math/scalar.h" #include "foundation/math/split.h" #include "foundation/platform/types.h" diff --git a/src/appleseed/foundation/math/intersection/frustumsegment.h b/src/appleseed/foundation/math/intersection/frustumsegment.h index d22ff61dc9..ee5e0c5f7b 100644 --- a/src/appleseed/foundation/math/intersection/frustumsegment.h +++ b/src/appleseed/foundation/math/intersection/frustumsegment.h @@ -30,8 +30,8 @@ #define APPLESEED_FOUNDATION_MATH_INTERSECTION_FRUSTUMSEGMENT_H // appleseed.foundation headers. -#include "foundation/math/intersection/planesegment.h" #include "foundation/math/frustum.h" +#include "foundation/math/intersection/planesegment.h" #include "foundation/math/vector.h" // Standard headers. diff --git a/src/appleseed/foundation/math/knn/knn_builder.h b/src/appleseed/foundation/math/knn/knn_builder.h index 682501c723..54979129ad 100644 --- a/src/appleseed/foundation/math/knn/knn_builder.h +++ b/src/appleseed/foundation/math/knn/knn_builder.h @@ -32,9 +32,9 @@ // appleseed.foundation headers. #include "foundation/core/concepts/noncopyable.h" +#include "foundation/math/aabb.h" #include "foundation/math/knn/knn_node.h" #include "foundation/math/knn/knn_tree.h" -#include "foundation/math/aabb.h" #include "foundation/math/permutation.h" #include "foundation/math/split.h" #include "foundation/math/vector.h" diff --git a/src/appleseed/foundation/math/knn/knn_query.h b/src/appleseed/foundation/math/knn/knn_query.h index 2f8e8955e5..d2a45d6fbb 100644 --- a/src/appleseed/foundation/math/knn/knn_query.h +++ b/src/appleseed/foundation/math/knn/knn_query.h @@ -32,11 +32,11 @@ // appleseed.foundation headers. #include "foundation/core/concepts/noncopyable.h" +#include "foundation/math/distance.h" +#include "foundation/math/fp.h" #include "foundation/math/knn/knn_answer.h" #include "foundation/math/knn/knn_statistics.h" #include "foundation/math/knn/knn_tree.h" -#include "foundation/math/distance.h" -#include "foundation/math/fp.h" #include "foundation/math/scalar.h" #include "foundation/math/vector.h" #include "foundation/platform/compiler.h" diff --git a/src/appleseed/foundation/math/noise.cpp b/src/appleseed/foundation/math/noise.cpp index 641b17f9e0..7a078b0ba0 100644 --- a/src/appleseed/foundation/math/noise.cpp +++ b/src/appleseed/foundation/math/noise.cpp @@ -31,8 +31,8 @@ #include "noise.h" // appleseed.foundation headers. -#include "foundation/math/rng/mersennetwister.h" #include "foundation/math/permutation.h" +#include "foundation/math/rng/mersennetwister.h" namespace foundation { diff --git a/src/appleseed/foundation/math/sampling/qmcsamplingcontext.h b/src/appleseed/foundation/math/sampling/qmcsamplingcontext.h index d5f6af4512..49bc030d2d 100644 --- a/src/appleseed/foundation/math/sampling/qmcsamplingcontext.h +++ b/src/appleseed/foundation/math/sampling/qmcsamplingcontext.h @@ -32,10 +32,10 @@ // appleseed.foundation headers. #include "foundation/core/exceptions/exceptionnotimplemented.h" -#include "foundation/math/rng/distribution.h" #include "foundation/math/permutation.h" #include "foundation/math/primes.h" #include "foundation/math/qmc.h" +#include "foundation/math/rng/distribution.h" #include "foundation/math/vector.h" #include "foundation/utility/test/helpers.h" diff --git a/src/appleseed/foundation/math/sampling/sphericalimportancesampler.h b/src/appleseed/foundation/math/sampling/sphericalimportancesampler.h index bb3c6e132a..a1549c8c69 100644 --- a/src/appleseed/foundation/math/sampling/sphericalimportancesampler.h +++ b/src/appleseed/foundation/math/sampling/sphericalimportancesampler.h @@ -31,9 +31,9 @@ // appleseed.foundation headers. #include "foundation/core/concepts/noncopyable.h" -#include "foundation/math/sampling/mappings.h" #include "foundation/math/area.h" #include "foundation/math/cdf.h" +#include "foundation/math/sampling/mappings.h" #include "foundation/math/scalar.h" #include "foundation/math/sphericaltriangle.h" #include "foundation/math/vector.h" @@ -42,9 +42,9 @@ // Standard headers. #include +#include #include #include -#include #include #include diff --git a/src/appleseed/foundation/math/voxel/voxel_intersector.h b/src/appleseed/foundation/math/voxel/voxel_intersector.h index ad2490c021..795eaac12f 100644 --- a/src/appleseed/foundation/math/voxel/voxel_intersector.h +++ b/src/appleseed/foundation/math/voxel/voxel_intersector.h @@ -32,8 +32,8 @@ // appleseed.foundation headers. #include "foundation/core/concepts/noncopyable.h" -#include "foundation/math/voxel/voxel_statistics.h" #include "foundation/math/ray.h" +#include "foundation/math/voxel/voxel_statistics.h" // Standard headers. #include diff --git a/src/appleseed/foundation/math/voxel/voxel_tree.h b/src/appleseed/foundation/math/voxel/voxel_tree.h index 85c821e134..64c94baf2b 100644 --- a/src/appleseed/foundation/math/voxel/voxel_tree.h +++ b/src/appleseed/foundation/math/voxel/voxel_tree.h @@ -32,10 +32,10 @@ // appleseed.foundation headers. #include "foundation/core/concepts/noncopyable.h" -#include "foundation/math/voxel/voxel_node.h" #include "foundation/math/aabb.h" #include "foundation/math/split.h" #include "foundation/math/vector.h" +#include "foundation/math/voxel/voxel_node.h" #include "foundation/platform/types.h" #include "foundation/utility/bufferedfile.h" diff --git a/src/appleseed/foundation/mesh/objmeshfilewriter.cpp b/src/appleseed/foundation/mesh/objmeshfilewriter.cpp index 75330a5ad9..2ba21f70e0 100644 --- a/src/appleseed/foundation/mesh/objmeshfilewriter.cpp +++ b/src/appleseed/foundation/mesh/objmeshfilewriter.cpp @@ -31,8 +31,8 @@ #include "objmeshfilewriter.h" // appleseed.foundation headers. -#include "foundation/core/exceptions/exceptionioerror.h" #include "foundation/core/appleseed.h" +#include "foundation/core/exceptions/exceptionioerror.h" #include "foundation/mesh/imeshwalker.h" #include "foundation/platform/types.h" #include "foundation/utility/otherwise.h" diff --git a/src/appleseed/foundation/meta/benchmarks/benchmark_cdf.cpp b/src/appleseed/foundation/meta/benchmarks/benchmark_cdf.cpp index a62cc87552..30c992ff6b 100644 --- a/src/appleseed/foundation/meta/benchmarks/benchmark_cdf.cpp +++ b/src/appleseed/foundation/meta/benchmarks/benchmark_cdf.cpp @@ -28,9 +28,9 @@ // // appleseed.foundation headers. +#include "foundation/math/cdf.h" #include "foundation/math/rng/distribution.h" #include "foundation/math/rng/xorshift.h" -#include "foundation/math/cdf.h" #include "foundation/utility/benchmark.h" // Standard headers. diff --git a/src/appleseed/foundation/meta/benchmarks/benchmark_fastmath.cpp b/src/appleseed/foundation/meta/benchmarks/benchmark_fastmath.cpp index 572bb2daac..092b367a79 100644 --- a/src/appleseed/foundation/meta/benchmarks/benchmark_fastmath.cpp +++ b/src/appleseed/foundation/meta/benchmarks/benchmark_fastmath.cpp @@ -28,9 +28,9 @@ // // appleseed.foundation headers. +#include "foundation/math/fastmath.h" #include "foundation/math/rng/distribution.h" #include "foundation/math/rng/mersennetwister.h" -#include "foundation/math/fastmath.h" #include "foundation/platform/compiler.h" #include "foundation/utility/benchmark.h" diff --git a/src/appleseed/foundation/meta/benchmarks/benchmark_intersection.cpp b/src/appleseed/foundation/meta/benchmarks/benchmark_intersection.cpp index 9d3092fd96..9a91c0e743 100644 --- a/src/appleseed/foundation/meta/benchmarks/benchmark_intersection.cpp +++ b/src/appleseed/foundation/meta/benchmarks/benchmark_intersection.cpp @@ -28,14 +28,14 @@ // // appleseed.foundation headers. +#include "foundation/math/aabb.h" #include "foundation/math/intersection/rayaabb.h" #include "foundation/math/intersection/raytrianglemt.h" #include "foundation/math/intersection/raytrianglessk.h" +#include "foundation/math/ray.h" #include "foundation/math/rng/distribution.h" #include "foundation/math/rng/mersennetwister.h" #include "foundation/math/sampling/mappings.h" -#include "foundation/math/aabb.h" -#include "foundation/math/ray.h" #include "foundation/math/vector.h" #include "foundation/platform/compiler.h" #include "foundation/utility/benchmark.h" diff --git a/src/appleseed/foundation/meta/benchmarks/benchmark_knn.cpp b/src/appleseed/foundation/meta/benchmarks/benchmark_knn.cpp index 5d9f6014bc..6cb4462ddb 100644 --- a/src/appleseed/foundation/meta/benchmarks/benchmark_knn.cpp +++ b/src/appleseed/foundation/meta/benchmarks/benchmark_knn.cpp @@ -28,10 +28,10 @@ // // appleseed.foundation headers. +#include "foundation/math/knn.h" #include "foundation/math/rng/distribution.h" #include "foundation/math/rng/mersennetwister.h" #include "foundation/math/rng/xorshift.h" -#include "foundation/math/knn.h" #include "foundation/math/vector.h" #include "foundation/platform/timers.h" #include "foundation/platform/types.h" diff --git a/src/appleseed/foundation/meta/benchmarks/benchmark_microfacet.cpp b/src/appleseed/foundation/meta/benchmarks/benchmark_microfacet.cpp index 7a4a3a73f1..c58b257a4e 100644 --- a/src/appleseed/foundation/meta/benchmarks/benchmark_microfacet.cpp +++ b/src/appleseed/foundation/meta/benchmarks/benchmark_microfacet.cpp @@ -28,9 +28,9 @@ // // appleseed.foundation headers. +#include "foundation/math/microfacet.h" #include "foundation/math/rng/distribution.h" #include "foundation/math/rng/lcg.h" -#include "foundation/math/microfacet.h" #include "foundation/math/vector.h" #include "foundation/utility/benchmark.h" diff --git a/src/appleseed/foundation/meta/benchmarks/benchmark_permutation.cpp b/src/appleseed/foundation/meta/benchmarks/benchmark_permutation.cpp index b35b47a4dd..7f3b602bc3 100644 --- a/src/appleseed/foundation/meta/benchmarks/benchmark_permutation.cpp +++ b/src/appleseed/foundation/meta/benchmarks/benchmark_permutation.cpp @@ -28,8 +28,8 @@ // // appleseed.foundation headers. -#include "foundation/math/rng/mersennetwister.h" #include "foundation/math/permutation.h" +#include "foundation/math/rng/mersennetwister.h" #include "foundation/platform/types.h" #include "foundation/utility/benchmark.h" diff --git a/src/appleseed/foundation/meta/benchmarks/benchmark_quaternion.cpp b/src/appleseed/foundation/meta/benchmarks/benchmark_quaternion.cpp index 0ea4edd5f9..664812c1bc 100644 --- a/src/appleseed/foundation/meta/benchmarks/benchmark_quaternion.cpp +++ b/src/appleseed/foundation/meta/benchmarks/benchmark_quaternion.cpp @@ -27,11 +27,11 @@ // // appleseed.foundation headers. +#include "foundation/math/matrix.h" +#include "foundation/math/quaternion.h" #include "foundation/math/rng/distribution.h" #include "foundation/math/rng/mersennetwister.h" #include "foundation/math/sampling/mappings.h" -#include "foundation/math/matrix.h" -#include "foundation/math/quaternion.h" #include "foundation/math/scalar.h" #include "foundation/math/vector.h" #include "foundation/utility/benchmark.h" diff --git a/src/appleseed/foundation/meta/tests/test_benchmarkaggregator.cpp b/src/appleseed/foundation/meta/tests/test_benchmarkaggregator.cpp index 0a2c4fcd4b..67299c579b 100644 --- a/src/appleseed/foundation/meta/tests/test_benchmarkaggregator.cpp +++ b/src/appleseed/foundation/meta/tests/test_benchmarkaggregator.cpp @@ -33,8 +33,8 @@ #include "foundation/utility/benchmark/benchmarkdatapoint.h" #include "foundation/utility/benchmark/benchmarkserie.h" #include "foundation/utility/containers/dictionary.h" -#include "foundation/utility/uid.h" #include "foundation/utility/test.h" +#include "foundation/utility/uid.h" // Boost headers. #include "boost/date_time/gregorian/gregorian.hpp" diff --git a/src/appleseed/foundation/meta/tests/test_bsp.cpp b/src/appleseed/foundation/meta/tests/test_bsp.cpp index 3815c07635..9012db21d7 100644 --- a/src/appleseed/foundation/meta/tests/test_bsp.cpp +++ b/src/appleseed/foundation/meta/tests/test_bsp.cpp @@ -29,9 +29,9 @@ // appleseed.foundation headers. #include "foundation/core/concepts/noncopyable.h" -#include "foundation/math/intersection/rayaabb.h" #include "foundation/math/aabb.h" #include "foundation/math/bsp.h" +#include "foundation/math/intersection/rayaabb.h" #include "foundation/math/ray.h" #include "foundation/math/split.h" #include "foundation/math/vector.h" diff --git a/src/appleseed/foundation/meta/tests/test_fresnel.cpp b/src/appleseed/foundation/meta/tests/test_fresnel.cpp index 9a113e7ceb..6e3085a8da 100644 --- a/src/appleseed/foundation/meta/tests/test_fresnel.cpp +++ b/src/appleseed/foundation/meta/tests/test_fresnel.cpp @@ -29,10 +29,10 @@ // appleseed.foundation headers. #include "foundation/image/regularspectrum.h" +#include "foundation/math/fresnel.h" #include "foundation/math/rng/distribution.h" #include "foundation/math/rng/mersennetwister.h" #include "foundation/math/sampling/mappings.h" -#include "foundation/math/fresnel.h" #include "foundation/math/scalar.h" #include "foundation/math/vector.h" #include "foundation/utility/gnuplotfile.h" diff --git a/src/appleseed/foundation/meta/tests/test_imageimportancesampler.cpp b/src/appleseed/foundation/meta/tests/test_imageimportancesampler.cpp index cd3d89aadf..159e8ec729 100644 --- a/src/appleseed/foundation/meta/tests/test_imageimportancesampler.cpp +++ b/src/appleseed/foundation/meta/tests/test_imageimportancesampler.cpp @@ -35,8 +35,8 @@ #include "foundation/image/genericimagefilereader.h" #include "foundation/image/genericimagefilewriter.h" #include "foundation/image/image.h" -#include "foundation/math/sampling/imageimportancesampler.h" #include "foundation/math/qmc.h" +#include "foundation/math/sampling/imageimportancesampler.h" #include "foundation/math/vector.h" #include "foundation/utility/test.h" diff --git a/src/appleseed/foundation/meta/tests/test_intersection_frustumaabb.cpp b/src/appleseed/foundation/meta/tests/test_intersection_frustumaabb.cpp index e5798e196b..cb80c6de88 100644 --- a/src/appleseed/foundation/meta/tests/test_intersection_frustumaabb.cpp +++ b/src/appleseed/foundation/meta/tests/test_intersection_frustumaabb.cpp @@ -27,9 +27,9 @@ // // appleseed.foundation headers. -#include "foundation/math/intersection/frustumaabb.h" #include "foundation/math/aabb.h" #include "foundation/math/frustum.h" +#include "foundation/math/intersection/frustumaabb.h" #include "foundation/math/vector.h" #include "foundation/utility/iostreamop.h" #include "foundation/utility/test.h" diff --git a/src/appleseed/foundation/meta/tests/test_intersection_frustumsegment.cpp b/src/appleseed/foundation/meta/tests/test_intersection_frustumsegment.cpp index a91989145d..09d460bd56 100644 --- a/src/appleseed/foundation/meta/tests/test_intersection_frustumsegment.cpp +++ b/src/appleseed/foundation/meta/tests/test_intersection_frustumsegment.cpp @@ -27,8 +27,8 @@ // // appleseed.foundation headers. -#include "foundation/math/intersection/frustumsegment.h" #include "foundation/math/frustum.h" +#include "foundation/math/intersection/frustumsegment.h" #include "foundation/math/vector.h" #include "foundation/utility/iostreamop.h" #include "foundation/utility/test.h" diff --git a/src/appleseed/foundation/meta/tests/test_intersection_rayaabb.cpp b/src/appleseed/foundation/meta/tests/test_intersection_rayaabb.cpp index 0129d24db1..50a08dd15c 100644 --- a/src/appleseed/foundation/meta/tests/test_intersection_rayaabb.cpp +++ b/src/appleseed/foundation/meta/tests/test_intersection_rayaabb.cpp @@ -28,8 +28,8 @@ // // appleseed.foundation headers. -#include "foundation/math/intersection/rayaabb.h" #include "foundation/math/aabb.h" +#include "foundation/math/intersection/rayaabb.h" #include "foundation/math/ray.h" #include "foundation/math/vector.h" #include "foundation/utility/test.h" diff --git a/src/appleseed/foundation/meta/tests/test_knn.cpp b/src/appleseed/foundation/meta/tests/test_knn.cpp index 4a2b3041f9..eb1cccf276 100644 --- a/src/appleseed/foundation/meta/tests/test_knn.cpp +++ b/src/appleseed/foundation/meta/tests/test_knn.cpp @@ -28,11 +28,11 @@ // // appleseed.foundation headers. -#include "foundation/math/rng/distribution.h" -#include "foundation/math/rng/mersennetwister.h" #include "foundation/math/distance.h" #include "foundation/math/knn.h" #include "foundation/math/permutation.h" +#include "foundation/math/rng/distribution.h" +#include "foundation/math/rng/mersennetwister.h" #include "foundation/math/scalar.h" #include "foundation/math/vector.h" #include "foundation/platform/timers.h" diff --git a/src/appleseed/foundation/meta/tests/test_microfacet.cpp b/src/appleseed/foundation/meta/tests/test_microfacet.cpp index 048f0f4932..09a6871019 100644 --- a/src/appleseed/foundation/meta/tests/test_microfacet.cpp +++ b/src/appleseed/foundation/meta/tests/test_microfacet.cpp @@ -29,9 +29,9 @@ // // appleseed.foundation headers. -#include "foundation/math/sampling/mappings.h" #include "foundation/math/microfacet.h" #include "foundation/math/qmc.h" +#include "foundation/math/sampling/mappings.h" #include "foundation/math/scalar.h" #include "foundation/math/vector.h" #include "foundation/utility/test.h" diff --git a/src/appleseed/foundation/meta/tests/test_permutation.cpp b/src/appleseed/foundation/meta/tests/test_permutation.cpp index 400452f85f..f411cab035 100644 --- a/src/appleseed/foundation/meta/tests/test_permutation.cpp +++ b/src/appleseed/foundation/meta/tests/test_permutation.cpp @@ -28,8 +28,8 @@ // // appleseed.foundation headers. -#include "foundation/math/rng/mersennetwister.h" #include "foundation/math/permutation.h" +#include "foundation/math/rng/mersennetwister.h" #include "foundation/utility/test.h" // Standard headers. diff --git a/src/appleseed/foundation/meta/tests/test_qmc.cpp b/src/appleseed/foundation/meta/tests/test_qmc.cpp index dad1c29dc8..5271053067 100644 --- a/src/appleseed/foundation/meta/tests/test_qmc.cpp +++ b/src/appleseed/foundation/meta/tests/test_qmc.cpp @@ -32,11 +32,11 @@ #include "foundation/image/genericimagefilewriter.h" #include "foundation/image/image.h" #include "foundation/image/pixel.h" -#include "foundation/math/rng/distribution.h" -#include "foundation/math/rng/mersennetwister.h" #include "foundation/math/permutation.h" #include "foundation/math/primes.h" #include "foundation/math/qmc.h" +#include "foundation/math/rng/distribution.h" +#include "foundation/math/rng/mersennetwister.h" #include "foundation/math/scalar.h" #include "foundation/math/vector.h" #include "foundation/platform/arch.h" diff --git a/src/appleseed/foundation/meta/tests/test_sampling.cpp b/src/appleseed/foundation/meta/tests/test_sampling.cpp index 1758a0978b..342cf45577 100644 --- a/src/appleseed/foundation/meta/tests/test_sampling.cpp +++ b/src/appleseed/foundation/meta/tests/test_sampling.cpp @@ -28,11 +28,11 @@ // // appleseed.foundation headers. +#include "foundation/math/fp.h" +#include "foundation/math/qmc.h" #include "foundation/math/rng/mersennetwister.h" #include "foundation/math/sampling/mappings.h" #include "foundation/math/sampling/qmcsamplingcontext.h" -#include "foundation/math/fp.h" -#include "foundation/math/qmc.h" #include "foundation/math/scalar.h" #include "foundation/math/vector.h" #include "foundation/utility/iostreamop.h" diff --git a/src/appleseed/foundation/meta/tests/test_sphericalimportancesampler.cpp b/src/appleseed/foundation/meta/tests/test_sphericalimportancesampler.cpp index 537be51fa5..0b19361ba0 100644 --- a/src/appleseed/foundation/meta/tests/test_sphericalimportancesampler.cpp +++ b/src/appleseed/foundation/meta/tests/test_sphericalimportancesampler.cpp @@ -27,8 +27,8 @@ // // appleseed.foundation headers. -#include "foundation/math/sampling/sphericalimportancesampler.h" #include "foundation/math/qmc.h" +#include "foundation/math/sampling/sphericalimportancesampler.h" #include "foundation/math/vector.h" #include "foundation/utility/test.h" #include "foundation/utility/vpythonfile.h" diff --git a/src/appleseed/foundation/utility/job/jobmanager.cpp b/src/appleseed/foundation/utility/job/jobmanager.cpp index f90bdd8527..46b76c98ca 100644 --- a/src/appleseed/foundation/utility/job/jobmanager.cpp +++ b/src/appleseed/foundation/utility/job/jobmanager.cpp @@ -31,9 +31,9 @@ #include "jobmanager.h" // appleseed.foundation headers. +#include "foundation/utility/foreach.h" #include "foundation/utility/job/jobqueue.h" #include "foundation/utility/job/workerthread.h" -#include "foundation/utility/foreach.h" #include "foundation/utility/log.h" // Standard headers. diff --git a/src/appleseed/foundation/utility/job/jobqueue.cpp b/src/appleseed/foundation/utility/job/jobqueue.cpp index 3368329a80..3ade5f84b3 100644 --- a/src/appleseed/foundation/utility/job/jobqueue.cpp +++ b/src/appleseed/foundation/utility/job/jobqueue.cpp @@ -32,10 +32,10 @@ // appleseed.foundation headers. #include "foundation/platform/thread.h" -#include "foundation/utility/job/abortswitch.h" -#include "foundation/utility/job/ijob.h" #include "foundation/utility/foreach.h" #include "foundation/utility/iterators.h" +#include "foundation/utility/job/abortswitch.h" +#include "foundation/utility/job/ijob.h" // Boost headers. #include "boost/thread/condition_variable.hpp" diff --git a/src/appleseed/foundation/utility/log/logger.cpp b/src/appleseed/foundation/utility/log/logger.cpp index dd5d418eba..c05d121f15 100644 --- a/src/appleseed/foundation/utility/log/logger.cpp +++ b/src/appleseed/foundation/utility/log/logger.cpp @@ -34,8 +34,8 @@ #include "foundation/platform/snprintf.h" #include "foundation/platform/system.h" #include "foundation/platform/thread.h" -#include "foundation/utility/log/ilogtarget.h" #include "foundation/utility/foreach.h" +#include "foundation/utility/log/ilogtarget.h" #include "foundation/utility/string.h" // Boost headers. diff --git a/src/appleseed/foundation/utility/test/assertions.h b/src/appleseed/foundation/utility/test/assertions.h index 9d49f3f304..a888a58b3a 100644 --- a/src/appleseed/foundation/utility/test/assertions.h +++ b/src/appleseed/foundation/utility/test/assertions.h @@ -32,12 +32,12 @@ // appleseed.foundation headers. #include "foundation/math/scalar.h" +#include "foundation/utility/countof.h" +#include "foundation/utility/string.h" #include "foundation/utility/test/exceptionassertionfailure.h" #include "foundation/utility/test/testlistenerhelper.h" #include "foundation/utility/test/testmessage.h" #include "foundation/utility/test/testresult.h" -#include "foundation/utility/countof.h" -#include "foundation/utility/string.h" // Standard headers. #include diff --git a/src/appleseed/foundation/utility/test/loggertestlistener.cpp b/src/appleseed/foundation/utility/test/loggertestlistener.cpp index bd9d2fbfc0..851dc1c750 100644 --- a/src/appleseed/foundation/utility/test/loggertestlistener.cpp +++ b/src/appleseed/foundation/utility/test/loggertestlistener.cpp @@ -33,13 +33,13 @@ // appleseed.foundation headers. #include "foundation/platform/compiler.h" #include "foundation/platform/types.h" -#include "foundation/utility/test/testlistenerbase.h" -#include "foundation/utility/test/testsuite.h" #include "foundation/utility/foreach.h" #include "foundation/utility/log.h" #include "foundation/utility/otherwise.h" #include "foundation/utility/string.h" #include "foundation/utility/test.h" +#include "foundation/utility/test/testlistenerbase.h" +#include "foundation/utility/test/testsuite.h" // Standard headers. #include diff --git a/src/appleseed/foundation/utility/test/testsuite.cpp b/src/appleseed/foundation/utility/test/testsuite.cpp index 9792d8f186..3f3db372f0 100644 --- a/src/appleseed/foundation/utility/test/testsuite.cpp +++ b/src/appleseed/foundation/utility/test/testsuite.cpp @@ -31,6 +31,7 @@ #include "testsuite.h" // appleseed.foundation headers. +#include "foundation/utility/filter.h" #include "foundation/utility/test/exceptionassertionfailure.h" #include "foundation/utility/test/itestcase.h" #include "foundation/utility/test/itestcasefactory.h" @@ -38,7 +39,6 @@ #include "foundation/utility/test/testlistenerhelper.h" #include "foundation/utility/test/testmessage.h" #include "foundation/utility/test/testresult.h" -#include "foundation/utility/filter.h" // Standard headers. #include diff --git a/src/appleseed/foundation/utility/xercesc.cpp b/src/appleseed/foundation/utility/xercesc.cpp index 9e5d76f97c..90717aa914 100644 --- a/src/appleseed/foundation/utility/xercesc.cpp +++ b/src/appleseed/foundation/utility/xercesc.cpp @@ -35,8 +35,8 @@ // Xerces-C++ headers. #include "xercesc/util/PlatformUtils.hpp" -#include "xercesc/util/XMLExceptMsgs.hpp" #include "xercesc/util/XMLException.hpp" +#include "xercesc/util/XMLExceptMsgs.hpp" using namespace std; using namespace xercesc; diff --git a/src/appleseed/main/allocator.cpp b/src/appleseed/main/allocator.cpp index 7cad014ced..4fb4960506 100644 --- a/src/appleseed/main/allocator.cpp +++ b/src/appleseed/main/allocator.cpp @@ -50,8 +50,8 @@ #ifdef _WIN32 // appleseed.foundation headers. -#include "foundation/platform/win32stackwalker.h" #include "foundation/platform/types.h" +#include "foundation/platform/win32stackwalker.h" #include "foundation/utility/foreach.h" #include "foundation/utility/memory.h" #include "foundation/utility/string.h" diff --git a/src/appleseed/renderer/api/project.h b/src/appleseed/renderer/api/project.h index be85930ed9..9f6c280bca 100644 --- a/src/appleseed/renderer/api/project.h +++ b/src/appleseed/renderer/api/project.h @@ -31,6 +31,8 @@ #define APPLESEED_RENDERER_API_PROJECT_H // API headers. +#include "renderer/modeling/project-builtin/cornellboxproject.h" +#include "renderer/modeling/project-builtin/defaultproject.h" #include "renderer/modeling/project/configuration.h" #include "renderer/modeling/project/configurationcontainer.h" #include "renderer/modeling/project/irenderlayerrulefactory.h" @@ -42,7 +44,5 @@ #include "renderer/modeling/project/renderlayerrulecontainer.h" #include "renderer/modeling/project/renderlayerrulefactoryregistrar.h" #include "renderer/modeling/project/renderlayerruletraits.h" -#include "renderer/modeling/project-builtin/cornellboxproject.h" -#include "renderer/modeling/project-builtin/defaultproject.h" #endif // !APPLESEED_RENDERER_API_PROJECT_H diff --git a/src/appleseed/renderer/api/rendering.h b/src/appleseed/renderer/api/rendering.h index f493240cd4..d499a85dc3 100644 --- a/src/appleseed/renderer/api/rendering.h +++ b/src/appleseed/renderer/api/rendering.h @@ -33,11 +33,10 @@ // API headers. #include "renderer/kernel/rendering/debug/blanktilerenderer.h" #include "renderer/kernel/rendering/debug/debugtilerenderer.h" +#include "renderer/kernel/rendering/defaultrenderercontroller.h" #include "renderer/kernel/rendering/generic/genericframerenderer.h" #include "renderer/kernel/rendering/generic/genericsamplerenderer.h" #include "renderer/kernel/rendering/generic/generictilerenderer.h" -#include "renderer/kernel/rendering/progressive/progressiveframerenderer.h" -#include "renderer/kernel/rendering/defaultrenderercontroller.h" #include "renderer/kernel/rendering/iframerenderer.h" #include "renderer/kernel/rendering/irenderercontroller.h" #include "renderer/kernel/rendering/isamplerenderer.h" @@ -45,6 +44,7 @@ #include "renderer/kernel/rendering/itilerenderer.h" #include "renderer/kernel/rendering/masterrenderer.h" #include "renderer/kernel/rendering/nulltilecallback.h" +#include "renderer/kernel/rendering/progressive/progressiveframerenderer.h" #include "renderer/kernel/rendering/scenepicker.h" #include "renderer/kernel/rendering/tilecallbackbase.h" #include "renderer/kernel/rendering/timedrenderercontroller.h" diff --git a/src/appleseed/renderer/global/globaltypes.h b/src/appleseed/renderer/global/globaltypes.h index ef960ce0a2..dd984532c7 100644 --- a/src/appleseed/renderer/global/globaltypes.h +++ b/src/appleseed/renderer/global/globaltypes.h @@ -35,10 +35,10 @@ // appleseed.foundation headers. #include "foundation/image/color.h" -#include "foundation/math/rng/mersennetwister.h" -#include "foundation/math/sampling/qmcsamplingcontext.h" #include "foundation/math/aabb.h" #include "foundation/math/ray.h" +#include "foundation/math/rng/mersennetwister.h" +#include "foundation/math/sampling/qmcsamplingcontext.h" #include "foundation/math/vector.h" namespace renderer diff --git a/src/appleseed/renderer/kernel/intersection/curvetree.cpp b/src/appleseed/renderer/kernel/intersection/curvetree.cpp index 59cd861d8a..94e299d322 100644 --- a/src/appleseed/renderer/kernel/intersection/curvetree.cpp +++ b/src/appleseed/renderer/kernel/intersection/curvetree.cpp @@ -46,8 +46,8 @@ #include "foundation/math/transform.h" #include "foundation/platform/defaulttimers.h" #include "foundation/platform/system.h" -#include "foundation/utility/api/apistring.h" #include "foundation/utility/alignedallocator.h" +#include "foundation/utility/api/apistring.h" #include "foundation/utility/makevector.h" #include "foundation/utility/memory.h" #include "foundation/utility/statistics.h" diff --git a/src/appleseed/renderer/kernel/intersection/intersectionsettings.h b/src/appleseed/renderer/kernel/intersection/intersectionsettings.h index 40770e987e..87e1959783 100644 --- a/src/appleseed/renderer/kernel/intersection/intersectionsettings.h +++ b/src/appleseed/renderer/kernel/intersection/intersectionsettings.h @@ -34,8 +34,8 @@ #include "renderer/global/globaltypes.h" // appleseed.foundation headers. -#include "foundation/math/intersection/raytrianglemt.h" #include "foundation/math/beziercurve.h" +#include "foundation/math/intersection/raytrianglemt.h" #include "foundation/math/matrix.h" // Standard headers. diff --git a/src/appleseed/renderer/kernel/intersection/triangletree.cpp b/src/appleseed/renderer/kernel/intersection/triangletree.cpp index 6ef6d1ea4a..c6488d3614 100644 --- a/src/appleseed/renderer/kernel/intersection/triangletree.cpp +++ b/src/appleseed/renderer/kernel/intersection/triangletree.cpp @@ -55,16 +55,16 @@ #include "renderer/utility/paramarray.h" // appleseed.foundation headers. -#include "foundation/math/intersection/aabbtriangle.h" #include "foundation/math/area.h" +#include "foundation/math/intersection/aabbtriangle.h" #include "foundation/math/scalar.h" #include "foundation/math/transform.h" #include "foundation/math/treeoptimizer.h" #include "foundation/math/vector.h" #include "foundation/platform/system.h" #include "foundation/platform/timers.h" -#include "foundation/utility/api/apistring.h" #include "foundation/utility/alignedallocator.h" +#include "foundation/utility/api/apistring.h" #include "foundation/utility/foreach.h" #include "foundation/utility/makevector.h" #include "foundation/utility/memory.h" diff --git a/src/appleseed/renderer/kernel/lighting/directlightingintegrator.cpp b/src/appleseed/renderer/kernel/lighting/directlightingintegrator.cpp index df32a50f31..206def6f20 100644 --- a/src/appleseed/renderer/kernel/lighting/directlightingintegrator.cpp +++ b/src/appleseed/renderer/kernel/lighting/directlightingintegrator.cpp @@ -587,7 +587,9 @@ void DirectLightingIntegrator::take_single_bsdf_sample( if (square_distance < square(edf->get_light_near_start())) return; - if (mis_heuristic != MISNone && square_distance > 0.0) + if (sample.m_probability != BSDF::DiracDelta && + mis_heuristic != MISNone && + square_distance > 0.0) { // Transform bsdf_prob to surface area measure (Veach: 8.2.2.2 eq. 8.10). const double bsdf_prob_area = sample.m_probability * cos_on / square_distance; diff --git a/src/appleseed/renderer/kernel/lighting/lightsampler.h b/src/appleseed/renderer/kernel/lighting/lightsampler.h index b7bbde6435..21b033db08 100644 --- a/src/appleseed/renderer/kernel/lighting/lightsampler.h +++ b/src/appleseed/renderer/kernel/lighting/lightsampler.h @@ -38,11 +38,11 @@ // appleseed.foundation headers. #include "foundation/core/concepts/noncopyable.h" -#include "foundation/platform/types.h" #include "foundation/math/cdf.h" #include "foundation/math/hash.h" #include "foundation/math/transform.h" #include "foundation/math/vector.h" +#include "foundation/platform/types.h" #include "foundation/utility/containers/hashtable.h" #include "foundation/utility/uid.h" diff --git a/src/appleseed/renderer/kernel/lighting/lighttracing/lighttracingsamplegenerator.cpp b/src/appleseed/renderer/kernel/lighting/lighttracing/lighttracingsamplegenerator.cpp index 670ee14a9f..6532025805 100644 --- a/src/appleseed/renderer/kernel/lighting/lighttracing/lighttracingsamplegenerator.cpp +++ b/src/appleseed/renderer/kernel/lighting/lighttracing/lighttracingsamplegenerator.cpp @@ -67,9 +67,9 @@ #include "foundation/image/canvasproperties.h" #include "foundation/image/color.h" #include "foundation/image/image.h" -#include "foundation/math/sampling/mappings.h" #include "foundation/math/basis.h" #include "foundation/math/population.h" +#include "foundation/math/sampling/mappings.h" #include "foundation/math/scalar.h" #include "foundation/math/transform.h" #include "foundation/math/vector.h" diff --git a/src/appleseed/renderer/kernel/lighting/pathtracer.h b/src/appleseed/renderer/kernel/lighting/pathtracer.h index b61d02e5c3..22f5d26503 100644 --- a/src/appleseed/renderer/kernel/lighting/pathtracer.h +++ b/src/appleseed/renderer/kernel/lighting/pathtracer.h @@ -52,10 +52,10 @@ // appleseed.foundation headers. #include "foundation/core/concepts/noncopyable.h" -#include "foundation/math/sampling/mappings.h" #include "foundation/math/dual.h" #include "foundation/math/ray.h" #include "foundation/math/rr.h" +#include "foundation/math/sampling/mappings.h" #include "foundation/math/scalar.h" #include "foundation/math/vector.h" #include "foundation/utility/string.h" diff --git a/src/appleseed/renderer/kernel/lighting/sppm/sppmlightingengine.cpp b/src/appleseed/renderer/kernel/lighting/sppm/sppmlightingengine.cpp index ba30afa8ab..bb48060cd2 100644 --- a/src/appleseed/renderer/kernel/lighting/sppm/sppmlightingengine.cpp +++ b/src/appleseed/renderer/kernel/lighting/sppm/sppmlightingengine.cpp @@ -33,13 +33,13 @@ // appleseed.renderer headers. #include "renderer/global/globaltypes.h" #include "renderer/kernel/aov/spectrumstack.h" -#include "renderer/kernel/lighting/sppm/sppmpasscallback.h" -#include "renderer/kernel/lighting/sppm/sppmphoton.h" -#include "renderer/kernel/lighting/sppm/sppmphotonmap.h" #include "renderer/kernel/lighting/directlightingintegrator.h" #include "renderer/kernel/lighting/pathtracer.h" #include "renderer/kernel/lighting/pathvertex.h" #include "renderer/kernel/lighting/scatteringmode.h" +#include "renderer/kernel/lighting/sppm/sppmpasscallback.h" +#include "renderer/kernel/lighting/sppm/sppmphoton.h" +#include "renderer/kernel/lighting/sppm/sppmphotonmap.h" #include "renderer/kernel/shading/shadingcontext.h" #include "renderer/kernel/shading/shadingpoint.h" #include "renderer/modeling/bsdf/bsdf.h" diff --git a/src/appleseed/renderer/kernel/lighting/sppm/sppmlightingengine.h b/src/appleseed/renderer/kernel/lighting/sppm/sppmlightingengine.h index c59146c5eb..e5520e1d4f 100644 --- a/src/appleseed/renderer/kernel/lighting/sppm/sppmlightingengine.h +++ b/src/appleseed/renderer/kernel/lighting/sppm/sppmlightingengine.h @@ -31,8 +31,8 @@ #define APPLESEED_RENDERER_KERNEL_LIGHTING_SPPM_SPPMLIGHTINGENGINE_H // appleseed.renderer headers. -#include "renderer/kernel/lighting/sppm/sppmparameters.h" #include "renderer/kernel/lighting/ilightingengine.h" +#include "renderer/kernel/lighting/sppm/sppmparameters.h" // appleseed.foundation headers. #include "foundation/platform/compiler.h" diff --git a/src/appleseed/renderer/kernel/lighting/sppm/sppmphotontracer.cpp b/src/appleseed/renderer/kernel/lighting/sppm/sppmphotontracer.cpp index 1b7d976373..8f1a28d7c1 100644 --- a/src/appleseed/renderer/kernel/lighting/sppm/sppmphotontracer.cpp +++ b/src/appleseed/renderer/kernel/lighting/sppm/sppmphotontracer.cpp @@ -62,9 +62,9 @@ #include "renderer/utility/transformsequence.h" // appleseed.foundation headers. -#include "foundation/math/sampling/mappings.h" #include "foundation/math/basis.h" #include "foundation/math/hash.h" +#include "foundation/math/sampling/mappings.h" #include "foundation/math/scalar.h" #include "foundation/math/transform.h" #include "foundation/math/vector.h" diff --git a/src/appleseed/renderer/kernel/rendering/localsampleaccumulationbuffer.cpp b/src/appleseed/renderer/kernel/rendering/localsampleaccumulationbuffer.cpp index 72ae959b54..50aa8ffed3 100644 --- a/src/appleseed/renderer/kernel/rendering/localsampleaccumulationbuffer.cpp +++ b/src/appleseed/renderer/kernel/rendering/localsampleaccumulationbuffer.cpp @@ -31,9 +31,9 @@ #include "localsampleaccumulationbuffer.h" // appleseed.renderer headers. -#include "renderer/kernel/rendering/sample.h" #include "renderer/kernel/aov/imagestack.h" #include "renderer/kernel/aov/tilestack.h" +#include "renderer/kernel/rendering/sample.h" #include "renderer/modeling/frame/frame.h" // appleseed.foundation headers. diff --git a/src/appleseed/renderer/kernel/rendering/progressive/progressiveframerenderer.cpp b/src/appleseed/renderer/kernel/rendering/progressive/progressiveframerenderer.cpp index 5d0cd0d186..b7b95091f4 100644 --- a/src/appleseed/renderer/kernel/rendering/progressive/progressiveframerenderer.cpp +++ b/src/appleseed/renderer/kernel/rendering/progressive/progressiveframerenderer.cpp @@ -32,12 +32,12 @@ // appleseed.renderer headers. #include "renderer/global/globallogger.h" -#include "renderer/kernel/rendering/progressive/samplecounter.h" -#include "renderer/kernel/rendering/progressive/samplecounthistory.h" -#include "renderer/kernel/rendering/progressive/samplegeneratorjob.h" #include "renderer/kernel/rendering/iframerenderer.h" #include "renderer/kernel/rendering/isamplegenerator.h" #include "renderer/kernel/rendering/itilecallback.h" +#include "renderer/kernel/rendering/progressive/samplecounter.h" +#include "renderer/kernel/rendering/progressive/samplecounthistory.h" +#include "renderer/kernel/rendering/progressive/samplegeneratorjob.h" #include "renderer/kernel/rendering/sampleaccumulationbuffer.h" #include "renderer/modeling/frame/frame.h" #include "renderer/modeling/project/project.h" diff --git a/src/appleseed/renderer/kernel/rendering/progressive/samplegeneratorjob.cpp b/src/appleseed/renderer/kernel/rendering/progressive/samplegeneratorjob.cpp index 622387f790..63409fbee1 100644 --- a/src/appleseed/renderer/kernel/rendering/progressive/samplegeneratorjob.cpp +++ b/src/appleseed/renderer/kernel/rendering/progressive/samplegeneratorjob.cpp @@ -32,8 +32,8 @@ // appleseed.renderer headers. #include "renderer/global/globallogger.h" -#include "renderer/kernel/rendering/progressive/samplecounter.h" #include "renderer/kernel/rendering/isamplegenerator.h" +#include "renderer/kernel/rendering/progressive/samplecounter.h" #include "renderer/kernel/rendering/sampleaccumulationbuffer.h" // appleseed.foundation headers. diff --git a/src/appleseed/renderer/kernel/rendering/renderercomponents.cpp b/src/appleseed/renderer/kernel/rendering/renderercomponents.cpp index f5f030c8e0..2687c2436a 100644 --- a/src/appleseed/renderer/kernel/rendering/renderercomponents.cpp +++ b/src/appleseed/renderer/kernel/rendering/renderercomponents.cpp @@ -41,15 +41,15 @@ #include "renderer/kernel/rendering/debug/blanktilerenderer.h" #include "renderer/kernel/rendering/debug/debugsamplerenderer.h" #include "renderer/kernel/rendering/debug/debugtilerenderer.h" +#include "renderer/kernel/rendering/ephemeralshadingresultframebufferfactory.h" #include "renderer/kernel/rendering/final/adaptivepixelrenderer.h" #include "renderer/kernel/rendering/final/uniformpixelrenderer.h" #include "renderer/kernel/rendering/generic/genericframerenderer.h" #include "renderer/kernel/rendering/generic/genericsamplegenerator.h" #include "renderer/kernel/rendering/generic/genericsamplerenderer.h" #include "renderer/kernel/rendering/generic/generictilerenderer.h" -#include "renderer/kernel/rendering/progressive/progressiveframerenderer.h" -#include "renderer/kernel/rendering/ephemeralshadingresultframebufferfactory.h" #include "renderer/kernel/rendering/permanentshadingresultframebufferfactory.h" +#include "renderer/kernel/rendering/progressive/progressiveframerenderer.h" #include "renderer/modeling/project/project.h" #include "renderer/utility/paramarray.h" diff --git a/src/appleseed/renderer/kernel/shading/fastambientocclusion.cpp b/src/appleseed/renderer/kernel/shading/fastambientocclusion.cpp index 18145df95c..cccdf3137f 100644 --- a/src/appleseed/renderer/kernel/shading/fastambientocclusion.cpp +++ b/src/appleseed/renderer/kernel/shading/fastambientocclusion.cpp @@ -46,11 +46,11 @@ #include "renderer/utility/transformsequence.h" // appleseed.foundation headers. +#include "foundation/math/aabb.h" #include "foundation/math/intersection/aabbtriangle.h" #include "foundation/math/intersection/rayaabb.h" -#include "foundation/math/sampling/mappings.h" -#include "foundation/math/aabb.h" #include "foundation/math/ray.h" +#include "foundation/math/sampling/mappings.h" #include "foundation/math/transform.h" #include "foundation/utility/foreach.h" #include "foundation/utility/lazy.h" diff --git a/src/appleseed/renderer/meta/tests/test_assembly.cpp b/src/appleseed/renderer/meta/tests/test_assembly.cpp index faa8872743..d0fa6ef55e 100644 --- a/src/appleseed/renderer/meta/tests/test_assembly.cpp +++ b/src/appleseed/renderer/meta/tests/test_assembly.cpp @@ -41,8 +41,8 @@ // appleseed.foundation headers. #include "foundation/math/matrix.h" #include "foundation/math/transform.h" -#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/autoreleaseptr.h" +#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/iostreamop.h" #include "foundation/utility/test.h" diff --git a/src/appleseed/renderer/meta/tests/test_intersector.cpp b/src/appleseed/renderer/meta/tests/test_intersector.cpp index e15f3452d1..06c7c8d4ab 100644 --- a/src/appleseed/renderer/meta/tests/test_intersector.cpp +++ b/src/appleseed/renderer/meta/tests/test_intersector.cpp @@ -49,8 +49,8 @@ #include "foundation/math/matrix.h" #include "foundation/math/transform.h" #include "foundation/math/vector.h" -#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/autoreleaseptr.h" +#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/test.h" using namespace foundation; diff --git a/src/appleseed/renderer/meta/tests/test_localsampleaccumulationbuffer.cpp b/src/appleseed/renderer/meta/tests/test_localsampleaccumulationbuffer.cpp index be060117e3..3a091e5767 100644 --- a/src/appleseed/renderer/meta/tests/test_localsampleaccumulationbuffer.cpp +++ b/src/appleseed/renderer/meta/tests/test_localsampleaccumulationbuffer.cpp @@ -33,10 +33,10 @@ #include "foundation/image/color.h" #include "foundation/image/filteredtile.h" #include "foundation/image/tile.h" -#include "foundation/math/rng/distribution.h" -#include "foundation/math/rng/mersennetwister.h" #include "foundation/math/aabb.h" #include "foundation/math/filter.h" +#include "foundation/math/rng/distribution.h" +#include "foundation/math/rng/mersennetwister.h" #include "foundation/math/vector.h" #include "foundation/utility/job.h" #include "foundation/utility/test.h" diff --git a/src/appleseed/renderer/meta/tests/test_scene.cpp b/src/appleseed/renderer/meta/tests/test_scene.cpp index 9db5ade2d6..b5164b1733 100644 --- a/src/appleseed/renderer/meta/tests/test_scene.cpp +++ b/src/appleseed/renderer/meta/tests/test_scene.cpp @@ -42,8 +42,8 @@ #include "foundation/math/matrix.h" #include "foundation/math/transform.h" #include "foundation/math/vector.h" -#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/autoreleaseptr.h" +#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/iostreamop.h" #include "foundation/utility/test.h" diff --git a/src/appleseed/renderer/meta/tests/test_tracer.cpp b/src/appleseed/renderer/meta/tests/test_tracer.cpp index 84b6cc75fb..5894c13dd7 100644 --- a/src/appleseed/renderer/meta/tests/test_tracer.cpp +++ b/src/appleseed/renderer/meta/tests/test_tracer.cpp @@ -60,8 +60,8 @@ #include "foundation/math/matrix.h" #include "foundation/math/transform.h" #include "foundation/math/vector.h" -#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/autoreleaseptr.h" +#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/iostreamop.h" #include "foundation/utility/test.h" diff --git a/src/appleseed/renderer/meta/tests/test_transformsequence.cpp b/src/appleseed/renderer/meta/tests/test_transformsequence.cpp index c086e37f7e..bac56b6af2 100644 --- a/src/appleseed/renderer/meta/tests/test_transformsequence.cpp +++ b/src/appleseed/renderer/meta/tests/test_transformsequence.cpp @@ -37,8 +37,8 @@ #include "foundation/math/transform.h" #include "foundation/math/vector.h" #include "foundation/utility/iostreamop.h" -#include "foundation/utility/vpythonfile.h" #include "foundation/utility/test.h" +#include "foundation/utility/vpythonfile.h" using namespace foundation; using namespace renderer; diff --git a/src/tools/animatecamera/main.cpp b/src/tools/animatecamera/main.cpp index 94496d766c..0cad590c27 100644 --- a/src/tools/animatecamera/main.cpp +++ b/src/tools/animatecamera/main.cpp @@ -48,8 +48,8 @@ #include "foundation/math/transform.h" #include "foundation/math/vector.h" #include "foundation/platform/types.h" -#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/autoreleaseptr.h" +#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/log.h" #include "foundation/utility/string.h" diff --git a/src/tools/dumpmetadata/main.cpp b/src/tools/dumpmetadata/main.cpp index 2112d4f1a4..33aba8a17d 100644 --- a/src/tools/dumpmetadata/main.cpp +++ b/src/tools/dumpmetadata/main.cpp @@ -51,8 +51,8 @@ // appleseed.foundation headers. #include "foundation/core/appleseed.h" -#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/api/specializedapiarrays.h" +#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/indenter.h" #include "foundation/utility/log.h" #include "foundation/utility/xmlelement.h" diff --git a/src/tools/makefluffy/main.cpp b/src/tools/makefluffy/main.cpp index 5304aa0e8f..0f701b9ad1 100644 --- a/src/tools/makefluffy/main.cpp +++ b/src/tools/makefluffy/main.cpp @@ -39,15 +39,15 @@ #include "renderer/api/scene.h" // appleseed.foundation headers. +#include "foundation/math/cdf.h" +#include "foundation/math/qmc.h" #include "foundation/math/rng/distribution.h" #include "foundation/math/rng/mersennetwister.h" #include "foundation/math/sampling/mappings.h" -#include "foundation/math/cdf.h" -#include "foundation/math/qmc.h" #include "foundation/math/scalar.h" #include "foundation/math/vector.h" -#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/autoreleaseptr.h" +#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/filter.h" #include "foundation/utility/foreach.h" #include "foundation/utility/uid.h" diff --git a/src/tools/updateprojectfile/main.cpp b/src/tools/updateprojectfile/main.cpp index 0cc308248d..b629f814f3 100644 --- a/src/tools/updateprojectfile/main.cpp +++ b/src/tools/updateprojectfile/main.cpp @@ -38,8 +38,8 @@ #include "renderer/api/project.h" // appleseed.foundation headers. -#include "foundation/utility/containers/dictionary.h" #include "foundation/utility/autoreleaseptr.h" +#include "foundation/utility/containers/dictionary.h" // Boost headers. #include "boost/filesystem/path.hpp"