From b5e245463baeec15878e777201b4ac76a8bb54f4 Mon Sep 17 00:00:00 2001 From: Murray Stevenson <50844517+murraystevenson@users.noreply.github.com> Date: Mon, 15 Apr 2024 13:09:22 -0700 Subject: [PATCH 1/6] Bump version for 1.5 development --- Changes.md | 5 +++++ SConstruct | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Changes.md b/Changes.md index 5d42401a65a..8acabcef783 100644 --- a/Changes.md +++ b/Changes.md @@ -1,3 +1,8 @@ +1.x.x.x (relative to 1.4.x.x) +======= + + + 1.4.x.x (relative to 1.4.0.0) ======= diff --git a/SConstruct b/SConstruct index bd8bd820ce5..1102f050051 100644 --- a/SConstruct +++ b/SConstruct @@ -62,7 +62,7 @@ if codecs.lookup( locale.getpreferredencoding() ).name != "utf-8" : ############################################################################################### gafferMilestoneVersion = 1 # for announcing major milestones - may contain all of the below -gafferMajorVersion = 4 # backwards-incompatible changes +gafferMajorVersion = 5 # backwards-incompatible changes gafferMinorVersion = 0 # new backwards-compatible features gafferPatchVersion = 0 # bug fixes gafferVersionSuffix = "" # used for alpha/beta releases : "a1", "b2", etc. From 6e9b47ab9bca87f8ec5ab5bc51ccb7dc48558691 Mon Sep 17 00:00:00 2001 From: John Haddon Date: Thu, 18 Apr 2024 11:03:48 +0100 Subject: [PATCH 2/6] Drop support for OpenEXR 2 --- SConstruct | 40 +------------------ include/Gaffer/BoxPlug.h | 5 --- include/Gaffer/CompoundNumericPlug.h | 6 --- include/Gaffer/MetadataAlgo.h | 5 --- include/GafferImage/BufferAlgo.h | 5 --- include/GafferImage/FilterAlgo.h | 5 --- include/GafferImage/Format.h | 5 --- include/GafferImage/ImageAlgo.h | 5 --- include/GafferScene/SceneAlgo.h | 5 --- include/GafferSceneUI/RotateTool.h | 5 --- include/GafferUI/Gadget.h | 5 --- include/GafferUI/GraphLayout.h | 5 --- include/GafferUI/KeyEvent.h | 5 --- include/GafferUI/RotateHandle.h | 5 --- include/GafferUI/StandardStyle.h | 5 --- include/GafferUI/Style.h | 5 --- src/Gaffer/Animation.cpp | 5 --- src/Gaffer/NumericPlug.cpp | 5 --- src/Gaffer/Random.cpp | 6 --- src/Gaffer/RandomChoice.cpp | 5 --- .../IECoreCyclesPreview/Renderer.cpp | 5 --- src/GafferImage/Checkerboard.cpp | 6 --- src/GafferImage/FormatQuery.cpp | 5 --- src/GafferImage/ImageAlgo.cpp | 5 --- src/GafferImage/ImageReader.cpp | 5 --- src/GafferImage/ImageTransform.cpp | 5 --- src/GafferImage/VectorWarp.cpp | 5 --- src/GafferImageUI/ImageView.cpp | 6 --- src/GafferOSL/ShadingEngineAlgo.cpp | 5 --- src/GafferScene/AimConstraint.cpp | 5 --- src/GafferScene/AttributeVisualiser.cpp | 5 --- src/GafferScene/BoundQuery.cpp | 5 --- src/GafferScene/EditScopeAlgo.cpp | 5 --- src/GafferScene/Group.cpp | 5 --- src/GafferScene/IECoreGLPreview/Renderer.cpp | 6 --- src/GafferScene/LightToCamera.cpp | 6 --- src/GafferScene/MapProjection.cpp | 5 --- src/GafferScene/MotionPath.cpp | 5 --- src/GafferScene/ObjectSource.cpp | 5 --- src/GafferScene/Orientation.cpp | 7 ---- src/GafferScene/PointConstraint.cpp | 5 --- src/GafferScene/SetVisualiser.cpp | 6 --- src/GafferScene/TransformQuery.cpp | 6 --- src/GafferSceneUI/CameraTool.cpp | 6 --- src/GafferSceneUI/LightPositionTool.cpp | 7 ---- src/GafferSceneUI/LightTool.cpp | 6 --- src/GafferSceneUI/OutputBuffer.cpp | 5 --- src/GafferSceneUI/RotateTool.cpp | 6 --- src/GafferSceneUI/ScaleTool.cpp | 5 --- src/GafferSceneUI/SceneView.cpp | 5 --- src/GafferSceneUI/TransformTool.cpp | 5 --- src/GafferSceneUI/TranslateTool.cpp | 5 --- src/GafferSceneUI/UVView.cpp | 5 --- src/GafferUI/AuxiliaryConnectionsGadget.cpp | 5 --- src/GafferUI/Gadget.cpp | 5 --- src/GafferUI/GraphGadget.cpp | 5 --- src/GafferUI/Handle.cpp | 14 +------ src/GafferUI/RotateHandle.cpp | 8 ---- src/GafferUI/StandardConnectionGadget.cpp | 6 --- src/GafferUI/StandardGraphLayout.cpp | 5 --- src/GafferUI/StandardNodeGadget.cpp | 5 --- src/GafferUI/StandardStyle.cpp | 6 --- src/GafferUI/ViewportGadget.cpp | 6 --- src/GafferVDB/VolumeScatter.cpp | 5 --- src/IECoreArnold/CameraAlgo.cpp | 5 --- 65 files changed, 3 insertions(+), 387 deletions(-) diff --git a/SConstruct b/SConstruct index 1102f050051..e3832d1d098 100644 --- a/SConstruct +++ b/SConstruct @@ -830,38 +830,6 @@ if ( int( baseLibEnv["BOOST_MAJOR_VERSION"] ), int( baseLibEnv["BOOST_MINOR_VERS # the reams of warnings triggered by that. baseLibEnv.Append( CPPDEFINES = [ "BOOST_BIND_GLOBAL_PLACEHOLDERS" ] ) -# Determine Imath version. The transition between 2 and 3 is a bit of a mess. -# Imath 3 provides `Imath/ImathConfig.h` for determining version, but that isn't -# provided by Imath 2, which comes with `OpenEXR/IlmBaseConfig.h` instead. The -# one thing we can rely on existing all the time is the conceptually unrelated -# `OpenEXR/OpenEXRConfig.h`, so we use that, even though we don't directly -# depend on OpenEXR ourselves. - -exrVersionHeader = baseLibEnv.FindFile( - "OpenEXR/OpenEXRConfig.h", - [ "$BUILD_DIR/include" ] + - baseLibEnv["LOCATE_DEPENDENCY_SYSTEMPATH"] + - baseLibEnv["LOCATE_DEPENDENCY_CPPPATH"] -) - -if not exrVersionHeader : - sys.stderr.write( "ERROR : unable to find \"OpenEXR/OpenEXRConfig.h\".\n" ) - Exit( 1 ) - -for line in open( str( exrVersionHeader ) ) : - m = re.match( r'^#define OPENEXR_VERSION_STRING "(\d+)\.(\d+)\.(\d+)"$', line ) - if m : - baseLibEnv["IMATH_MAJOR_VERSION"] = int( m.group( 1 ) ) - -if baseLibEnv.get( "IMATH_MAJOR_VERSION", None ) is None : - sys.stderr.write( "ERROR : unable to determine version from \"{}\".\n".format( exrVersionHeader ) ) - Exit( 1 ) - -# Imath 2 came with a separate `Half` library but in Imath 3 everything is in -# the `Imath` library. - -baseLibEnv["HALF_LIBRARY"] = "Half" if baseLibEnv["IMATH_MAJOR_VERSION"] < 3 else "" - ############################################################################################### # The basic environment for building python modules ############################################################################################### @@ -1039,11 +1007,7 @@ cyclesDefines = [ libraries = { - "Gaffer" : { - "envAppends" : { - "LIBS" : [ "$HALF_LIBRARY" ], - }, - }, + "Gaffer" : {}, "GafferTest" : { "envAppends" : { @@ -1124,7 +1088,7 @@ libraries = { "GafferScene" : { "envAppends" : { - "LIBS" : [ "Gaffer", "Iex$IMATH_LIB_SUFFIX", "IECoreGL$CORTEX_LIB_SUFFIX", "IECoreImage$CORTEX_LIB_SUFFIX", "IECoreScene$CORTEX_LIB_SUFFIX", "GafferImage", "GafferDispatch", "$HALF_LIBRARY", "osdCPU" ], + "LIBS" : [ "Gaffer", "Iex$IMATH_LIB_SUFFIX", "IECoreGL$CORTEX_LIB_SUFFIX", "IECoreImage$CORTEX_LIB_SUFFIX", "IECoreScene$CORTEX_LIB_SUFFIX", "GafferImage", "GafferDispatch", "osdCPU" ], }, "pythonEnvAppends" : { "LIBS" : [ "GafferBindings", "GafferScene", "GafferDispatch", "GafferImage", "IECoreScene$CORTEX_LIB_SUFFIX", "IECoreGL$CORTEX_LIB_SUFFIX" ], diff --git a/include/Gaffer/BoxPlug.h b/include/Gaffer/BoxPlug.h index 23b8d9ff472..710d1bf9df5 100644 --- a/include/Gaffer/BoxPlug.h +++ b/include/Gaffer/BoxPlug.h @@ -43,12 +43,7 @@ #include "IECore/Export.h" IECORE_PUSH_DEFAULT_VISIBILITY -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathBox.h" -#else #include "Imath/ImathBox.h" -#endif IECORE_POP_DEFAULT_VISIBILITY namespace Gaffer diff --git a/include/Gaffer/CompoundNumericPlug.h b/include/Gaffer/CompoundNumericPlug.h index c5a7dd735b1..b5d2292e7e0 100644 --- a/include/Gaffer/CompoundNumericPlug.h +++ b/include/Gaffer/CompoundNumericPlug.h @@ -43,14 +43,8 @@ #include "IECore/GeometricTypedData.h" IECORE_PUSH_DEFAULT_VISIBILITY -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathColor.h" -#include "OpenEXR/ImathVec.h" -#else #include "Imath/ImathColor.h" #include "Imath/ImathVec.h" -#endif IECORE_POP_DEFAULT_VISIBILITY namespace Gaffer diff --git a/include/Gaffer/MetadataAlgo.h b/include/Gaffer/MetadataAlgo.h index 20e1c4d5757..5973cdf6986 100644 --- a/include/Gaffer/MetadataAlgo.h +++ b/include/Gaffer/MetadataAlgo.h @@ -43,12 +43,7 @@ #include "IECore/StringAlgo.h" #include "IECore/TypeIds.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathColor.h" -#else #include "Imath/ImathColor.h" -#endif #include diff --git a/include/GafferImage/BufferAlgo.h b/include/GafferImage/BufferAlgo.h index af022d76ed0..b2424ff8362 100644 --- a/include/GafferImage/BufferAlgo.h +++ b/include/GafferImage/BufferAlgo.h @@ -39,12 +39,7 @@ #include "IECore/Export.h" IECORE_PUSH_DEFAULT_VISIBILITY -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathBox.h" -#else #include "Imath/ImathBox.h" -#endif IECORE_POP_DEFAULT_VISIBILITY namespace GafferImage diff --git a/include/GafferImage/FilterAlgo.h b/include/GafferImage/FilterAlgo.h index 6ac53545396..0cba1eb28db 100644 --- a/include/GafferImage/FilterAlgo.h +++ b/include/GafferImage/FilterAlgo.h @@ -43,12 +43,7 @@ #include "OpenImageIO/filter.h" IECORE_PUSH_DEFAULT_VISIBILITY -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathVec.h" -#else #include "Imath/ImathVec.h" -#endif IECORE_POP_DEFAULT_VISIBILITY namespace GafferImage diff --git a/include/GafferImage/Format.h b/include/GafferImage/Format.h index 8de5c9bf140..9888962a0c8 100644 --- a/include/GafferImage/Format.h +++ b/include/GafferImage/Format.h @@ -42,12 +42,7 @@ #include "IECore/MurmurHash.h" IECORE_PUSH_DEFAULT_VISIBILITY -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathBox.h" -#else #include "Imath/ImathBox.h" -#endif IECORE_POP_DEFAULT_VISIBILITY #include diff --git a/include/GafferImage/ImageAlgo.h b/include/GafferImage/ImageAlgo.h index 40879058c3a..7f537fc97de 100644 --- a/include/GafferImage/ImageAlgo.h +++ b/include/GafferImage/ImageAlgo.h @@ -46,12 +46,7 @@ #include "IECore/Export.h" IECORE_PUSH_DEFAULT_VISIBILITY -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathBox.h" -#else #include "Imath/ImathBox.h" -#endif IECORE_POP_DEFAULT_VISIBILITY #include diff --git a/include/GafferScene/SceneAlgo.h b/include/GafferScene/SceneAlgo.h index 3c08155fc52..5659be807a8 100644 --- a/include/GafferScene/SceneAlgo.h +++ b/include/GafferScene/SceneAlgo.h @@ -48,12 +48,7 @@ #include "IECore/Export.h" IECORE_PUSH_DEFAULT_VISIBILITY -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathVec.h" -#else #include "Imath/ImathVec.h" -#endif IECORE_POP_DEFAULT_VISIBILITY #include diff --git a/include/GafferSceneUI/RotateTool.h b/include/GafferSceneUI/RotateTool.h index 88e7ece3d37..1be8f6077ea 100644 --- a/include/GafferSceneUI/RotateTool.h +++ b/include/GafferSceneUI/RotateTool.h @@ -41,12 +41,7 @@ #include "GafferUI/Style.h" IECORE_PUSH_DEFAULT_VISIBILITY -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathEuler.h" -#else #include "Imath/ImathEuler.h" -#endif IECORE_POP_DEFAULT_VISIBILITY namespace GafferSceneUI diff --git a/include/GafferUI/Gadget.h b/include/GafferUI/Gadget.h index c771af25c4e..b1fc2983563 100644 --- a/include/GafferUI/Gadget.h +++ b/include/GafferUI/Gadget.h @@ -52,12 +52,7 @@ #include "IECore/Export.h" IECORE_PUSH_DEFAULT_VISIBILITY -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathBox.h" -#else #include "Imath/ImathBox.h" -#endif IECORE_POP_DEFAULT_VISIBILITY #include diff --git a/include/GafferUI/GraphLayout.h b/include/GafferUI/GraphLayout.h index 277ae7ad581..c754e9ec055 100644 --- a/include/GafferUI/GraphLayout.h +++ b/include/GafferUI/GraphLayout.h @@ -44,12 +44,7 @@ #include "IECore/RunTimeTyped.h" IECORE_PUSH_DEFAULT_VISIBILITY -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathVec.h" -#else #include "Imath/ImathVec.h" -#endif IECORE_POP_DEFAULT_VISIBILITY namespace Gaffer diff --git a/include/GafferUI/KeyEvent.h b/include/GafferUI/KeyEvent.h index 4191427a69e..9924da7433b 100644 --- a/include/GafferUI/KeyEvent.h +++ b/include/GafferUI/KeyEvent.h @@ -41,12 +41,7 @@ #include "IECore/Export.h" IECORE_PUSH_DEFAULT_VISIBILITY -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathVec.h" -#else #include "Imath/ImathVec.h" -#endif IECORE_POP_DEFAULT_VISIBILITY namespace GafferUI diff --git a/include/GafferUI/RotateHandle.h b/include/GafferUI/RotateHandle.h index 4aba8200c50..73c38934bb1 100644 --- a/include/GafferUI/RotateHandle.h +++ b/include/GafferUI/RotateHandle.h @@ -39,12 +39,7 @@ #include "GafferUI/Handle.h" IECORE_PUSH_DEFAULT_VISIBILITY -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathEuler.h" -#else #include "Imath/ImathEuler.h" -#endif IECORE_POP_DEFAULT_VISIBILITY namespace GafferUI diff --git a/include/GafferUI/StandardStyle.h b/include/GafferUI/StandardStyle.h index 46ecb8f5cca..b2cee00c203 100644 --- a/include/GafferUI/StandardStyle.h +++ b/include/GafferUI/StandardStyle.h @@ -42,12 +42,7 @@ #include "IECore/Export.h" IECORE_PUSH_DEFAULT_VISIBILITY -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathColor.h" -#else #include "Imath/ImathColor.h" -#endif IECORE_POP_DEFAULT_VISIBILITY #include diff --git a/include/GafferUI/Style.h b/include/GafferUI/Style.h index d0b3443eaab..b4984006408 100644 --- a/include/GafferUI/Style.h +++ b/include/GafferUI/Style.h @@ -49,12 +49,7 @@ #include "IECore/RunTimeTyped.h" IECORE_PUSH_DEFAULT_VISIBILITY -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathBox.h" -#else #include "Imath/ImathBox.h" -#endif IECORE_POP_DEFAULT_VISIBILITY namespace IECoreGL diff --git a/src/Gaffer/Animation.cpp b/src/Gaffer/Animation.cpp index eb59d1540b9..54b8a41333a 100644 --- a/src/Gaffer/Animation.cpp +++ b/src/Gaffer/Animation.cpp @@ -40,12 +40,7 @@ #include "Gaffer/Context.h" #include "Gaffer/Private/ScopedAssignment.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathFun.h" -#else #include "Imath/ImathFun.h" -#endif #include #include diff --git a/src/Gaffer/NumericPlug.cpp b/src/Gaffer/NumericPlug.cpp index fca2059c8ec..57cbf15179d 100644 --- a/src/Gaffer/NumericPlug.cpp +++ b/src/Gaffer/NumericPlug.cpp @@ -39,12 +39,7 @@ #include "Gaffer/TypedPlug.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathFun.h" -#else #include "Imath/ImathFun.h" -#endif using namespace IECore; using namespace Gaffer; diff --git a/src/Gaffer/Random.cpp b/src/Gaffer/Random.cpp index 57d9e7b74c6..bccbfe58d51 100644 --- a/src/Gaffer/Random.cpp +++ b/src/Gaffer/Random.cpp @@ -40,14 +40,8 @@ #include "Gaffer/Context.h" #include "Gaffer/StringPlug.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathColorAlgo.h" -#include "OpenEXR/ImathRandom.h" -#else #include "Imath/ImathColorAlgo.h" #include "Imath/ImathRandom.h" -#endif #include "boost/functional/hash.hpp" diff --git a/src/Gaffer/RandomChoice.cpp b/src/Gaffer/RandomChoice.cpp index bc386b6e029..4dcfaee4bb1 100644 --- a/src/Gaffer/RandomChoice.cpp +++ b/src/Gaffer/RandomChoice.cpp @@ -44,12 +44,7 @@ #include "IECore/TypeTraits.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathRandom.h" -#else #include "Imath/ImathRandom.h" -#endif #include "fmt/format.h" diff --git a/src/GafferCycles/IECoreCyclesPreview/Renderer.cpp b/src/GafferCycles/IECoreCyclesPreview/Renderer.cpp index 661c642300d..6683cf509e7 100644 --- a/src/GafferCycles/IECoreCyclesPreview/Renderer.cpp +++ b/src/GafferCycles/IECoreCyclesPreview/Renderer.cpp @@ -62,12 +62,7 @@ #include "IECore/StringAlgo.h" #include "IECore/VectorTypedData.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathMatrixAlgo.h" -#else #include "Imath/ImathMatrixAlgo.h" -#endif #include "boost/algorithm/string.hpp" #include "boost/algorithm/string/predicate.hpp" diff --git a/src/GafferImage/Checkerboard.cpp b/src/GafferImage/Checkerboard.cpp index 6bcb3d817fc..2536e102b3e 100644 --- a/src/GafferImage/Checkerboard.cpp +++ b/src/GafferImage/Checkerboard.cpp @@ -42,14 +42,8 @@ #include "Gaffer/Context.h" #include "Gaffer/Transform2DPlug.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathFun.h" -#include "OpenEXR/ImathMatrixAlgo.h" -#else #include "Imath/ImathFun.h" #include "Imath/ImathMatrixAlgo.h" -#endif using namespace std; using namespace Imath; diff --git a/src/GafferImage/FormatQuery.cpp b/src/GafferImage/FormatQuery.cpp index b97d0b2525d..af6170b871c 100644 --- a/src/GafferImage/FormatQuery.cpp +++ b/src/GafferImage/FormatQuery.cpp @@ -36,12 +36,7 @@ #include "GafferImage/FormatQuery.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathBoxAlgo.h" -#else #include "Imath/ImathBoxAlgo.h" -#endif #include diff --git a/src/GafferImage/ImageAlgo.cpp b/src/GafferImage/ImageAlgo.cpp index 7cd2264a43b..52d3be80db0 100644 --- a/src/GafferImage/ImageAlgo.cpp +++ b/src/GafferImage/ImageAlgo.cpp @@ -38,12 +38,7 @@ #include "IECore/CompoundData.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathBox.h" -#else #include "Imath/ImathBox.h" -#endif #include "fmt/format.h" diff --git a/src/GafferImage/ImageReader.cpp b/src/GafferImage/ImageReader.cpp index 9e9ee267bc9..5401a3815ee 100644 --- a/src/GafferImage/ImageReader.cpp +++ b/src/GafferImage/ImageReader.cpp @@ -42,12 +42,7 @@ #include "Gaffer/StringPlug.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathFun.h" -#else #include "Imath/ImathFun.h" -#endif #include "OpenColorIO/OpenColorIO.h" diff --git a/src/GafferImage/ImageTransform.cpp b/src/GafferImage/ImageTransform.cpp index b8daaaa561f..0ca7c26c5c0 100644 --- a/src/GafferImage/ImageTransform.cpp +++ b/src/GafferImage/ImageTransform.cpp @@ -46,12 +46,7 @@ #include "IECore/AngleConversion.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathMatrixAlgo.h" -#else #include "Imath/ImathMatrixAlgo.h" -#endif #include "boost/bind/bind.hpp" diff --git a/src/GafferImage/VectorWarp.cpp b/src/GafferImage/VectorWarp.cpp index b21ee78133f..0551ca2d000 100644 --- a/src/GafferImage/VectorWarp.cpp +++ b/src/GafferImage/VectorWarp.cpp @@ -41,12 +41,7 @@ #include "Gaffer/Context.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathFun.h" -#else #include "Imath/ImathFun.h" -#endif #include diff --git a/src/GafferImageUI/ImageView.cpp b/src/GafferImageUI/ImageView.cpp index 02988fe9326..c8b03e6bf69 100644 --- a/src/GafferImageUI/ImageView.cpp +++ b/src/GafferImageUI/ImageView.cpp @@ -73,14 +73,8 @@ #include "IECore/BoxOps.h" #include "IECore/FastFloat.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathColorAlgo.h" -#include "OpenEXR/ImathMatrixAlgo.h" -#else #include "Imath/ImathColorAlgo.h" #include "Imath/ImathMatrixAlgo.h" -#endif #include "boost/bind/bind.hpp" #include "boost/bind/placeholders.hpp" diff --git a/src/GafferOSL/ShadingEngineAlgo.cpp b/src/GafferOSL/ShadingEngineAlgo.cpp index e02da08475e..a89edb8baaa 100644 --- a/src/GafferOSL/ShadingEngineAlgo.cpp +++ b/src/GafferOSL/ShadingEngineAlgo.cpp @@ -41,12 +41,7 @@ #include "IECore/SimpleTypedData.h" #include "IECore/VectorTypedData.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathBox.h" -#else #include "Imath/ImathBox.h" -#endif using namespace Imath; using namespace IECore; diff --git a/src/GafferScene/AimConstraint.cpp b/src/GafferScene/AimConstraint.cpp index a00929e5876..62ae731a9d0 100644 --- a/src/GafferScene/AimConstraint.cpp +++ b/src/GafferScene/AimConstraint.cpp @@ -36,12 +36,7 @@ #include "GafferScene/AimConstraint.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathMatrixAlgo.h" -#else #include "Imath/ImathMatrixAlgo.h" -#endif using namespace Imath; using namespace Gaffer; diff --git a/src/GafferScene/AttributeVisualiser.cpp b/src/GafferScene/AttributeVisualiser.cpp index 2c24400096a..fa34c64fcb6 100644 --- a/src/GafferScene/AttributeVisualiser.cpp +++ b/src/GafferScene/AttributeVisualiser.cpp @@ -41,12 +41,7 @@ #include "IECoreScene/Shader.h" #include "IECoreScene/ShaderNetwork.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathRandom.h" -#else #include "Imath/ImathRandom.h" -#endif #include "fmt/format.h" diff --git a/src/GafferScene/BoundQuery.cpp b/src/GafferScene/BoundQuery.cpp index 09ab59e497e..0c50186111e 100644 --- a/src/GafferScene/BoundQuery.cpp +++ b/src/GafferScene/BoundQuery.cpp @@ -36,12 +36,7 @@ #include "GafferScene/BoundQuery.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathBoxAlgo.h" -#else #include "Imath/ImathBoxAlgo.h" -#endif #include #include diff --git a/src/GafferScene/EditScopeAlgo.cpp b/src/GafferScene/EditScopeAlgo.cpp index 4c8dcc237cd..dc8a3327c30 100644 --- a/src/GafferScene/EditScopeAlgo.cpp +++ b/src/GafferScene/EditScopeAlgo.cpp @@ -56,12 +56,7 @@ #include "IECore/AngleConversion.h" #include "IECore/CamelCase.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathMatrixAlgo.h" -#else #include "Imath/ImathMatrixAlgo.h" -#endif #include "boost/algorithm/string/predicate.hpp" #include "boost/algorithm/string/replace.hpp" diff --git a/src/GafferScene/Group.cpp b/src/GafferScene/Group.cpp index 59cf25055d7..8fda3411e6a 100644 --- a/src/GafferScene/Group.cpp +++ b/src/GafferScene/Group.cpp @@ -47,12 +47,7 @@ #include "IECore/NullObject.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathBoxAlgo.h" -#else #include "Imath/ImathBoxAlgo.h" -#endif using namespace std; using namespace Imath; diff --git a/src/GafferScene/IECoreGLPreview/Renderer.cpp b/src/GafferScene/IECoreGLPreview/Renderer.cpp index 8a5bf2bc4d7..41a38fe7b8c 100644 --- a/src/GafferScene/IECoreGLPreview/Renderer.cpp +++ b/src/GafferScene/IECoreGLPreview/Renderer.cpp @@ -68,14 +68,8 @@ #include "IECore/StringAlgo.h" #include "IECore/Writer.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathBoxAlgo.h" -#include "OpenEXR/ImathMatrixAlgo.h" -#else #include "Imath/ImathBoxAlgo.h" #include "Imath/ImathMatrixAlgo.h" -#endif #include "boost/algorithm/string/predicate.hpp" diff --git a/src/GafferScene/LightToCamera.cpp b/src/GafferScene/LightToCamera.cpp index 9ff4ea4a597..2cfd648921e 100644 --- a/src/GafferScene/LightToCamera.cpp +++ b/src/GafferScene/LightToCamera.cpp @@ -48,14 +48,8 @@ #include "IECore/AngleConversion.h" IECORE_PUSH_DEFAULT_VISIBILITY -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathMatrix.h" -#include "OpenEXR/ImathVec.h" -#else #include "Imath/ImathMatrix.h" #include "Imath/ImathVec.h" -#endif IECORE_POP_DEFAULT_VISIBILITY #include "boost/algorithm/string.hpp" diff --git a/src/GafferScene/MapProjection.cpp b/src/GafferScene/MapProjection.cpp index 38f9f3ceba1..9719a57796e 100644 --- a/src/GafferScene/MapProjection.cpp +++ b/src/GafferScene/MapProjection.cpp @@ -43,12 +43,7 @@ #include "IECore/AngleConversion.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathFun.h" -#else #include "Imath/ImathFun.h" -#endif #include "fmt/format.h" diff --git a/src/GafferScene/MotionPath.cpp b/src/GafferScene/MotionPath.cpp index 032b20ecd36..2056e7f7efd 100644 --- a/src/GafferScene/MotionPath.cpp +++ b/src/GafferScene/MotionPath.cpp @@ -44,12 +44,7 @@ #include "IECoreScene/CurvesPrimitive.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathMatrixAlgo.h" -#else #include "Imath/ImathMatrixAlgo.h" -#endif using namespace IECore; using namespace IECoreScene; diff --git a/src/GafferScene/ObjectSource.cpp b/src/GafferScene/ObjectSource.cpp index 9a48b25b18e..02b68898e0f 100644 --- a/src/GafferScene/ObjectSource.cpp +++ b/src/GafferScene/ObjectSource.cpp @@ -44,12 +44,7 @@ #include "IECore/NullObject.h" #include "IECore/StringAlgo.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathBoxAlgo.h" -#else #include "Imath/ImathBoxAlgo.h" -#endif using namespace GafferScene; diff --git a/src/GafferScene/Orientation.cpp b/src/GafferScene/Orientation.cpp index eed957f9c27..838f34f8f56 100644 --- a/src/GafferScene/Orientation.cpp +++ b/src/GafferScene/Orientation.cpp @@ -49,16 +49,9 @@ #include "IECore/AngleConversion.h" #include "IECore/MatrixAlgo.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathEuler.h" -#include "OpenEXR/ImathMatrixAlgo.h" -#include "OpenEXR/ImathRandom.h" -#else #include "Imath/ImathEuler.h" #include "Imath/ImathMatrixAlgo.h" #include "Imath/ImathRandom.h" -#endif #include "fmt/format.h" diff --git a/src/GafferScene/PointConstraint.cpp b/src/GafferScene/PointConstraint.cpp index 7c190af28c3..12461818ec7 100644 --- a/src/GafferScene/PointConstraint.cpp +++ b/src/GafferScene/PointConstraint.cpp @@ -36,12 +36,7 @@ #include "GafferScene/PointConstraint.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathMatrixAlgo.h" -#else #include "Imath/ImathMatrixAlgo.h" -#endif using namespace Imath; using namespace Gaffer; diff --git a/src/GafferScene/SetVisualiser.cpp b/src/GafferScene/SetVisualiser.cpp index 825753fcbc0..44e895ce99f 100644 --- a/src/GafferScene/SetVisualiser.cpp +++ b/src/GafferScene/SetVisualiser.cpp @@ -45,14 +45,8 @@ #include "IECoreScene/ShaderNetwork.h" #include "IECore/StringAlgo.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathColorAlgo.h" -#include "OpenEXR/ImathRandom.h" -#else #include "Imath/ImathColorAlgo.h" #include "Imath/ImathRandom.h" -#endif #include "boost/algorithm/string/predicate.hpp" diff --git a/src/GafferScene/TransformQuery.cpp b/src/GafferScene/TransformQuery.cpp index aa16f2d9a4e..0bb24550e05 100644 --- a/src/GafferScene/TransformQuery.cpp +++ b/src/GafferScene/TransformQuery.cpp @@ -36,14 +36,8 @@ #include "GafferScene/TransformQuery.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathMatrixAlgo.h" -#include "OpenEXR/ImathEuler.h" -#else #include "Imath/ImathMatrixAlgo.h" #include "Imath/ImathEuler.h" -#endif #include #include diff --git a/src/GafferSceneUI/CameraTool.cpp b/src/GafferSceneUI/CameraTool.cpp index 1814c09837d..f2d0427c69e 100644 --- a/src/GafferSceneUI/CameraTool.cpp +++ b/src/GafferSceneUI/CameraTool.cpp @@ -48,14 +48,8 @@ #include "IECore/AngleConversion.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathEuler.h" -#include "OpenEXR/ImathMatrix.h" -#else #include "Imath/ImathEuler.h" #include "Imath/ImathMatrix.h" -#endif #include "boost/algorithm/string/predicate.hpp" #include "boost/bind/bind.hpp" diff --git a/src/GafferSceneUI/LightPositionTool.cpp b/src/GafferSceneUI/LightPositionTool.cpp index ee0e3517000..6c1e20c1517 100644 --- a/src/GafferSceneUI/LightPositionTool.cpp +++ b/src/GafferSceneUI/LightPositionTool.cpp @@ -57,16 +57,9 @@ #include "IECore/AngleConversion.h" IECORE_PUSH_DEFAULT_VISIBILITY -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathEuler.h" -#include "OpenEXR/ImathMatrixAlgo.h" -#include "OpenEXR/ImathVecAlgo.h" -#else #include "Imath/ImathEuler.h" #include "Imath/ImathMatrixAlgo.h" #include "Imath/ImathVecAlgo.h" -#endif IECORE_POP_DEFAULT_VISIBILITY #include "boost/algorithm/string/predicate.hpp" diff --git a/src/GafferSceneUI/LightTool.cpp b/src/GafferSceneUI/LightTool.cpp index 00625638348..89dd140ab4d 100644 --- a/src/GafferSceneUI/LightTool.cpp +++ b/src/GafferSceneUI/LightTool.cpp @@ -74,14 +74,8 @@ #include "boost/algorithm/string/predicate.hpp" #include "boost/bind/bind.hpp" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathMatrixAlgo.h" -#include "OpenEXR/ImathSphere.h" -#else #include "Imath/ImathMatrixAlgo.h" #include "Imath/ImathSphere.h" -#endif #include "fmt/format.h" diff --git a/src/GafferSceneUI/OutputBuffer.cpp b/src/GafferSceneUI/OutputBuffer.cpp index 220436c1e75..c039b58ae77 100644 --- a/src/GafferSceneUI/OutputBuffer.cpp +++ b/src/GafferSceneUI/OutputBuffer.cpp @@ -39,12 +39,7 @@ #include "IECoreImage/DisplayDriver.h" #include "IECoreImage/OpenImageIOAlgo.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathBoxAlgo.h" -#else #include "Imath/ImathBoxAlgo.h" -#endif #include "OpenImageIO/imageio.h" diff --git a/src/GafferSceneUI/RotateTool.cpp b/src/GafferSceneUI/RotateTool.cpp index b498412224c..6ef65f9beaa 100644 --- a/src/GafferSceneUI/RotateTool.cpp +++ b/src/GafferSceneUI/RotateTool.cpp @@ -49,14 +49,8 @@ #include "IECore/Export.h" IECORE_PUSH_DEFAULT_VISIBILITY -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathEuler.h" -#include "OpenEXR/ImathMatrixAlgo.h" -#else #include "Imath/ImathEuler.h" #include "Imath/ImathMatrixAlgo.h" -#endif IECORE_POP_DEFAULT_VISIBILITY #include "boost/bind/bind.hpp" diff --git a/src/GafferSceneUI/ScaleTool.cpp b/src/GafferSceneUI/ScaleTool.cpp index 74a8b2fb4d1..fb7e5445b09 100644 --- a/src/GafferSceneUI/ScaleTool.cpp +++ b/src/GafferSceneUI/ScaleTool.cpp @@ -44,12 +44,7 @@ #include "Gaffer/ScriptNode.h" #include "Gaffer/UndoScope.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathMatrixAlgo.h" -#else #include "Imath/ImathMatrixAlgo.h" -#endif #include "boost/bind/bind.hpp" diff --git a/src/GafferSceneUI/SceneView.cpp b/src/GafferSceneUI/SceneView.cpp index e4fba02038e..c27a6368c49 100644 --- a/src/GafferSceneUI/SceneView.cpp +++ b/src/GafferSceneUI/SceneView.cpp @@ -70,12 +70,7 @@ #include "IECore/AngleConversion.h" #include "IECore/VectorTypedData.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathMatrixAlgo.h" -#else #include "Imath/ImathMatrixAlgo.h" -#endif #include "boost/algorithm/string/predicate.hpp" #include "boost/bind/bind.hpp" diff --git a/src/GafferSceneUI/TransformTool.cpp b/src/GafferSceneUI/TransformTool.cpp index f24c13ca586..1bf5c08506f 100644 --- a/src/GafferSceneUI/TransformTool.cpp +++ b/src/GafferSceneUI/TransformTool.cpp @@ -55,12 +55,7 @@ #include "IECore/AngleConversion.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathMatrixAlgo.h" -#else #include "Imath/ImathMatrixAlgo.h" -#endif #include "boost/algorithm/string/predicate.hpp" #include "boost/bind/bind.hpp" diff --git a/src/GafferSceneUI/TranslateTool.cpp b/src/GafferSceneUI/TranslateTool.cpp index 584b696dced..01d0b0a21d7 100644 --- a/src/GafferSceneUI/TranslateTool.cpp +++ b/src/GafferSceneUI/TranslateTool.cpp @@ -47,12 +47,7 @@ #include "Gaffer/ScriptNode.h" #include "Gaffer/UndoScope.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathMatrixAlgo.h" -#else #include "Imath/ImathMatrixAlgo.h" -#endif #include "boost/bind/bind.hpp" diff --git a/src/GafferSceneUI/UVView.cpp b/src/GafferSceneUI/UVView.cpp index 0a707c3947c..d4cd65544c8 100644 --- a/src/GafferSceneUI/UVView.cpp +++ b/src/GafferSceneUI/UVView.cpp @@ -60,12 +60,7 @@ #include "IECore/Math.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathFun.h" -#else #include "Imath/ImathFun.h" -#endif #include "boost/algorithm/string/replace.hpp" #include "boost/bind/bind.hpp" diff --git a/src/GafferUI/AuxiliaryConnectionsGadget.cpp b/src/GafferUI/AuxiliaryConnectionsGadget.cpp index f223d8800db..b4641dc0fb4 100644 --- a/src/GafferUI/AuxiliaryConnectionsGadget.cpp +++ b/src/GafferUI/AuxiliaryConnectionsGadget.cpp @@ -46,12 +46,7 @@ #include "IECoreGL/Selector.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathBoxAlgo.h" -#else #include "Imath/ImathBoxAlgo.h" -#endif #include "boost/algorithm/string/predicate.hpp" #include "boost/bind/bind.hpp" diff --git a/src/GafferUI/Gadget.cpp b/src/GafferUI/Gadget.cpp index 2fe54dfd312..c28282ea475 100644 --- a/src/GafferUI/Gadget.cpp +++ b/src/GafferUI/Gadget.cpp @@ -45,12 +45,7 @@ #include "IECore/SimpleTypedData.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathBoxAlgo.h" -#else #include "Imath/ImathBoxAlgo.h" -#endif #include "boost/bind/bind.hpp" #include "boost/lexical_cast.hpp" diff --git a/src/GafferUI/GraphGadget.cpp b/src/GafferUI/GraphGadget.cpp index 3b8aed5b5e3..7e50bc6d24d 100644 --- a/src/GafferUI/GraphGadget.cpp +++ b/src/GafferUI/GraphGadget.cpp @@ -73,12 +73,7 @@ #include "IECore/NullObject.h" IECORE_PUSH_DEFAULT_VISIBILITY -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathPlane.h" -#else #include "Imath/ImathPlane.h" -#endif IECORE_POP_DEFAULT_VISIBILITY #include "boost/bind/bind.hpp" diff --git a/src/GafferUI/Handle.cpp b/src/GafferUI/Handle.cpp index 00341a1e05f..8caf6c7d390 100644 --- a/src/GafferUI/Handle.cpp +++ b/src/GafferUI/Handle.cpp @@ -44,23 +44,11 @@ #include "IECore/NullObject.h" IECORE_PUSH_DEFAULT_VISIBILITY -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathLine.h" -#include "OpenEXR/ImathPlane.h" -#else #include "Imath/ImathLine.h" #include "Imath/ImathPlane.h" -#endif -IECORE_POP_DEFAULT_VISIBILITY - -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathMatrixAlgo.h" -#include "OpenEXR/ImathVecAlgo.h" -#else #include "Imath/ImathMatrixAlgo.h" #include "Imath/ImathVecAlgo.h" -#endif +IECORE_POP_DEFAULT_VISIBILITY #include "boost/bind/bind.hpp" #include "boost/bind/placeholders.hpp" diff --git a/src/GafferUI/RotateHandle.cpp b/src/GafferUI/RotateHandle.cpp index 8b011f70ad0..11709386735 100644 --- a/src/GafferUI/RotateHandle.cpp +++ b/src/GafferUI/RotateHandle.cpp @@ -40,18 +40,10 @@ #include "IECore/Export.h" IECORE_PUSH_DEFAULT_VISIBILITY -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathEuler.h" -#include "OpenEXR/ImathMatrixAlgo.h" -#include "OpenEXR/ImathSphere.h" -#include "OpenEXR/ImathQuat.h" -#else #include "Imath/ImathEuler.h" #include "Imath/ImathMatrixAlgo.h" #include "Imath/ImathSphere.h" #include "Imath/ImathQuat.h" -#endif IECORE_POP_DEFAULT_VISIBILITY #include "boost/bind/bind.hpp" diff --git a/src/GafferUI/StandardConnectionGadget.cpp b/src/GafferUI/StandardConnectionGadget.cpp index 8a1c911d68b..1ea625580e1 100644 --- a/src/GafferUI/StandardConnectionGadget.cpp +++ b/src/GafferUI/StandardConnectionGadget.cpp @@ -49,14 +49,8 @@ #include "Gaffer/StandardSet.h" #include "Gaffer/UndoScope.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathBoxAlgo.h" -#include "OpenEXR/ImathFun.h" -#else #include "Imath/ImathBoxAlgo.h" #include "Imath/ImathFun.h" -#endif #include "boost/bind/bind.hpp" #include "boost/bind/placeholders.hpp" diff --git a/src/GafferUI/StandardGraphLayout.cpp b/src/GafferUI/StandardGraphLayout.cpp index bfdcd0cff45..aae196b57c6 100644 --- a/src/GafferUI/StandardGraphLayout.cpp +++ b/src/GafferUI/StandardGraphLayout.cpp @@ -64,12 +64,7 @@ #include "IECore/MessageHandler.h" IECORE_PUSH_DEFAULT_VISIBILITY -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathVec.h" -#else #include "Imath/ImathVec.h" -#endif IECORE_POP_DEFAULT_VISIBILITY #include "boost/graph/adjacency_list.hpp" diff --git a/src/GafferUI/StandardNodeGadget.cpp b/src/GafferUI/StandardNodeGadget.cpp index f626432e6d5..67a8c63086d 100644 --- a/src/GafferUI/StandardNodeGadget.cpp +++ b/src/GafferUI/StandardNodeGadget.cpp @@ -61,12 +61,7 @@ #include "IECore/MessageHandler.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathBoxAlgo.h" -#else #include "Imath/ImathBoxAlgo.h" -#endif // Don't include Qt macros that stomp over common names like "signals" #define QT_NO_KEYWORDS diff --git a/src/GafferUI/StandardStyle.cpp b/src/GafferUI/StandardStyle.cpp index fadf798dce4..3ae54b3a0e0 100644 --- a/src/GafferUI/StandardStyle.cpp +++ b/src/GafferUI/StandardStyle.cpp @@ -57,14 +57,8 @@ #include "IECoreScene/Font.h" #include "IECoreScene/MeshPrimitive.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathVecAlgo.h" -#include "OpenEXR/ImathMatrixAlgo.h" -#else #include "Imath/ImathVecAlgo.h" #include "Imath/ImathMatrixAlgo.h" -#endif #include "boost/container/flat_map.hpp" #include "boost/tokenizer.hpp" diff --git a/src/GafferUI/ViewportGadget.cpp b/src/GafferUI/ViewportGadget.cpp index 3092c8a4fd5..dd8131c1f94 100644 --- a/src/GafferUI/ViewportGadget.cpp +++ b/src/GafferUI/ViewportGadget.cpp @@ -52,14 +52,8 @@ #include "IECore/NullObject.h" #include "IECore/SimpleTypedData.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathBoxAlgo.h" -#include "OpenEXR/ImathMatrixAlgo.h" -#else #include "Imath/ImathBoxAlgo.h" #include "Imath/ImathMatrixAlgo.h" -#endif #include "boost/bind/bind.hpp" #include "boost/bind/placeholders.hpp" diff --git a/src/GafferVDB/VolumeScatter.cpp b/src/GafferVDB/VolumeScatter.cpp index 3d0702cb0aa..e60ce2c8932 100644 --- a/src/GafferVDB/VolumeScatter.cpp +++ b/src/GafferVDB/VolumeScatter.cpp @@ -45,12 +45,7 @@ #include "IECoreScene/PointsPrimitive.h" #include "IECoreVDB/VDBObject.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathRandom.h" -#else #include "Imath/ImathRandom.h" -#endif #include "openvdb/openvdb.h" #include "openvdb/tools/PointScatter.h" diff --git a/src/IECoreArnold/CameraAlgo.cpp b/src/IECoreArnold/CameraAlgo.cpp index f63cec8af14..6d532d5e215 100644 --- a/src/IECoreArnold/CameraAlgo.cpp +++ b/src/IECoreArnold/CameraAlgo.cpp @@ -44,12 +44,7 @@ #include "IECore/SimpleTypedData.h" #include "IECore/SplineData.h" -#include "OpenEXR/OpenEXRConfig.h" -#if OPENEXR_VERSION_MAJOR < 3 -#include "OpenEXR/ImathFun.h" -#else #include "Imath/ImathFun.h" -#endif #include "ai_array.h" #include "ai_msg.h" // Required for __AI_FILE__ macro used by `ai_array.h` From 846ff842b84e393ebf40d75481a7039753f8ea7b Mon Sep 17 00:00:00 2001 From: John Haddon Date: Tue, 23 Apr 2024 15:27:02 +0100 Subject: [PATCH 3/6] Prefer `std::variant` to `boost::variant` This removes all usage of `boost::variant`, except for one in SetAlgo, where the interaction with `boost::reference_wrapper` makes removal trickier. --- include/GafferUI/NoduleLayout.h | 5 ++--- src/Gaffer/Spreadsheet.cpp | 10 +++++----- src/GafferScene/SceneAlgo.cpp | 4 ++-- src/GafferUI/NoduleLayout.cpp | 12 ++++++------ 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/include/GafferUI/NoduleLayout.h b/include/GafferUI/NoduleLayout.h index 026f4b6af87..45a3e7afe00 100644 --- a/include/GafferUI/NoduleLayout.h +++ b/include/GafferUI/NoduleLayout.h @@ -42,9 +42,8 @@ #include "IECore/StringAlgo.h" -#include "boost/variant.hpp" - #include +#include namespace Gaffer { @@ -112,7 +111,7 @@ class GAFFERUI_API NoduleLayout : public Gadget GadgetPtr gadget; }; // Either a plug or the name of a custom widget - using GadgetKey = boost::variant; + using GadgetKey = std::variant; // Map from plugs and custom gadget names to the gadgets // that represent them. using GadgetMap = std::map; diff --git a/src/Gaffer/Spreadsheet.cpp b/src/Gaffer/Spreadsheet.cpp index 97c13b17a36..eeacfc44867 100644 --- a/src/Gaffer/Spreadsheet.cpp +++ b/src/Gaffer/Spreadsheet.cpp @@ -48,11 +48,11 @@ #include "boost/multi_index/member.hpp" #include "boost/multi_index/hashed_index.hpp" #include "boost/multi_index_container.hpp" -#include "boost/variant.hpp" #include "fmt/format.h" #include +#include using namespace std; using namespace boost; @@ -91,7 +91,7 @@ class RowsMap : public IECore::Data public : - using Selector = boost::variant *, string>; + using Selector = std::variant *, string>; RowsMap( const Spreadsheet::RowsPlug *rows ) : m_enabledRowNames( new StringVectorData ) @@ -149,11 +149,11 @@ class RowsMap : public IECore::Data // Hashes the contents of the selector. static void hash( const Selector &selector, IECore::MurmurHash &h ) { - if( auto s = get( &selector ) ) + if( auto s = get_if( &selector ) ) { h.append( *s ); } - else if( auto p = get *>( &selector ) ) + else if( auto p = get_if *>( &selector ) ) { h.append( (*p)->data(), (*p)->size() ); } @@ -162,7 +162,7 @@ class RowsMap : public IECore::Data size_t rowIndex( const Selector &selector ) const { size_t result = 0; - if( auto s = get( &selector ) ) + if( auto s = get_if( &selector ) ) { auto it = m_plainRows.find( *s ); if( it != m_plainRows.end() ) diff --git a/src/GafferScene/SceneAlgo.cpp b/src/GafferScene/SceneAlgo.cpp index 8f1f66606c4..2aff3832787 100644 --- a/src/GafferScene/SceneAlgo.cpp +++ b/src/GafferScene/SceneAlgo.cpp @@ -469,7 +469,7 @@ class CapturingMonitor : public Monitor ProcessMap::const_iterator it = m_processMap.find( process->parent() ); if( it != m_processMap.end() ) { - CapturedProcess * const * parent = boost::get< CapturedProcess* >( &it->second ); + CapturedProcess * const * parent = std::get_if( &it->second ); if( parent && *parent ) { (*parent)->children.push_back( std::move( capturedProcess ) ); @@ -520,7 +520,7 @@ class CapturingMonitor : public Monitor Mutex m_mutex; - using ProcessOrScope = boost::variant>; + using ProcessOrScope = std::variant>; using ProcessMap = boost::unordered_map; ProcessMap m_processMap; diff --git a/src/GafferUI/NoduleLayout.cpp b/src/GafferUI/NoduleLayout.cpp index c38be2791ac..a54c42c85bf 100644 --- a/src/GafferUI/NoduleLayout.cpp +++ b/src/GafferUI/NoduleLayout.cpp @@ -148,7 +148,7 @@ bool visible( const GraphComponent *parent, const InternedString &gadgetName, IE // Plug metadata accessors. These affect the layout of individual nodules. -using GadgetKey = boost::variant; +using GadgetKey = std::variant; int layoutIndex( const Plug *plug, int defaultValue ) { @@ -194,15 +194,15 @@ bool visible( const Plug *plug, IECore::InternedString section ) InternedString gadgetType( const GraphComponent *parent, const GadgetKey &gadgetKey ) { - if( gadgetKey.which() == 0 ) + if( gadgetKey.index() == 0 ) { - const Plug *plug = boost::get( gadgetKey ); + const Plug *plug = std::get( gadgetKey ); ConstStringDataPtr d = Metadata::value( plug, g_noduleTypeKey ); return d ? d->readable() : "GafferUI::StandardNodule"; } else { - const InternedString &name = boost::get( gadgetKey ); + const InternedString &name = std::get( gadgetKey ); ConstStringDataPtr d = Metadata::value( parent, "noduleLayout:customGadget:" + name.string() + ":gadgetType" ); return d ? d->readable() : ""; } @@ -638,9 +638,9 @@ void NoduleLayout::updateNoduleLayout() else { // No gadget created yet, or it's the wrong type - if( item.which() == 0 ) + if( item.index() == 0 ) { - gadget = Nodule::create( const_cast( boost::get( item ) ) ); /// \todo Fix cast + gadget = Nodule::create( const_cast( std::get( item ) ) ); /// \todo Fix cast } else if( !gadgetType.string().empty() ) { From 3b8edc70244373fdca1cb2acb8b89c28ab9fa2fb Mon Sep 17 00:00:00 2001 From: John Haddon Date: Tue, 23 Apr 2024 16:50:42 +0100 Subject: [PATCH 4/6] Prefer `std::optional` to `boost::optional` --- .../IECoreCyclesPreview/Renderer.cpp | 35 +++++++++---------- src/GafferVDB/PointsToLevelSet.cpp | 4 --- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/src/GafferCycles/IECoreCyclesPreview/Renderer.cpp b/src/GafferCycles/IECoreCyclesPreview/Renderer.cpp index e3ac6f580af..048e2e1a037 100644 --- a/src/GafferCycles/IECoreCyclesPreview/Renderer.cpp +++ b/src/GafferCycles/IECoreCyclesPreview/Renderer.cpp @@ -72,7 +72,6 @@ #include "boost/algorithm/string.hpp" #include "boost/algorithm/string/predicate.hpp" #include "boost/container/flat_map.hpp" -#include "boost/optional.hpp" #include "tbb/concurrent_unordered_map.h" #include "tbb/concurrent_hash_map.h" @@ -222,11 +221,11 @@ T attributeValue( const IECore::InternedString &name, const IECore::CompoundObje } template -boost::optional optionalAttribute( const IECore::InternedString &name, const IECore::CompoundObject *attributes ) +std::optional optionalAttribute( const IECore::InternedString &name, const IECore::CompoundObject *attributes ) { using DataType = IECore::TypedData; const DataType *data = attribute( name, attributes ); - return data ? data->readable() : boost::optional(); + return data ? data->readable() : std::optional(); } template @@ -1212,9 +1211,9 @@ class CyclesAttributes : public IECoreScenePreview::Renderer::AttributesInterfac objectSpace = optionalAttribute( g_volumeObjectSpaceAttributeName, attributes ); } - boost::optional clipping; - boost::optional stepSize; - boost::optional objectSpace; + std::optional clipping; + std::optional stepSize; + std::optional objectSpace; bool apply( ccl::Object *object ) const { @@ -1222,11 +1221,11 @@ class CyclesAttributes : public IECoreScenePreview::Renderer::AttributesInterfac { ccl::Volume *volume = (ccl::Volume*)object->get_geometry(); if( clipping ) - volume->set_clipping( clipping.get() ); + volume->set_clipping( clipping.value() ); if( stepSize ) - volume->set_step_size( stepSize.get() ); + volume->set_step_size( stepSize.value() ); if( objectSpace ) - volume->set_object_space( objectSpace.get() ); + volume->set_object_space( objectSpace.value() ); } return true; } @@ -1252,11 +1251,11 @@ class CyclesAttributes : public IECoreScenePreview::Renderer::AttributesInterfac } ConstDataPtr emissionSamplingMethod; - boost::optional useTransparentShadow; - boost::optional heterogeneousVolume; + std::optional useTransparentShadow; + std::optional heterogeneousVolume; ConstDataPtr volumeSamplingMethod; ConstDataPtr volumeInterpolationMethod; - boost::optional volumeStepRate; + std::optional volumeStepRate; void hash( IECore::MurmurHash &h, const IECore::CompoundObject *attributes ) const { @@ -1266,23 +1265,23 @@ class CyclesAttributes : public IECoreScenePreview::Renderer::AttributesInterfac auto it = attributes->members().find( g_cyclesVolumeShaderAttributeName ); if( it != attributes->members().end() ) { - if( heterogeneousVolume && !heterogeneousVolume.get() ) + if( heterogeneousVolume && !heterogeneousVolume.value() ) h.append( "homogeneous_volume" ); volumeSamplingMethod->hash( h ); volumeInterpolationMethod->hash( h ); - if( volumeStepRate && volumeStepRate.get() != 1.0f ) - h.append( volumeStepRate.get() ); + if( volumeStepRate && volumeStepRate.value() != 1.0f ) + h.append( volumeStepRate.value() ); } } bool apply( ccl::Shader *shader ) const { SocketAlgo::setSocket( shader, shader->get_emission_sampling_method_socket(), emissionSamplingMethod.get() ); - shader->set_use_transparent_shadow(useTransparentShadow ? useTransparentShadow.get() : true ); - shader->set_heterogeneous_volume( heterogeneousVolume ? heterogeneousVolume.get() : true ); + shader->set_use_transparent_shadow( useTransparentShadow ? useTransparentShadow.value() : true ); + shader->set_heterogeneous_volume( heterogeneousVolume ? heterogeneousVolume.value() : true ); SocketAlgo::setSocket( shader, shader->get_volume_sampling_method_socket(), volumeSamplingMethod.get() ); SocketAlgo::setSocket( shader, shader->get_volume_interpolation_method_socket(), volumeInterpolationMethod.get() ); - shader->set_volume_step_rate( volumeStepRate ? volumeStepRate.get() : 1.0f ); + shader->set_volume_step_rate( volumeStepRate ? volumeStepRate.value() : 1.0f ); return true; } diff --git a/src/GafferVDB/PointsToLevelSet.cpp b/src/GafferVDB/PointsToLevelSet.cpp index 831ef9861b1..9d3923871d3 100644 --- a/src/GafferVDB/PointsToLevelSet.cpp +++ b/src/GafferVDB/PointsToLevelSet.cpp @@ -122,11 +122,7 @@ struct ParticleList private : template -#if CORTEX_COMPATIBILITY_VERSION >= 10005 using OptionalIndexedView = std::optional>; -#else - using OptionalIndexedView = boost::optional>; -#endif PrimitiveVariable::IndexedView m_positionView; OptionalIndexedView m_widthView; From ce166350a7526daeea82ffb604cda6da2e02d24f Mon Sep 17 00:00:00 2001 From: Tobias Kummer Date: Wed, 24 Apr 2024 14:40:08 +0200 Subject: [PATCH 5/6] Update CropWindowToolUI.py fix typo --- python/GafferSceneUI/CropWindowToolUI.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/GafferSceneUI/CropWindowToolUI.py b/python/GafferSceneUI/CropWindowToolUI.py index 03e9c26ede5..1d1b10dd965 100644 --- a/python/GafferSceneUI/CropWindowToolUI.py +++ b/python/GafferSceneUI/CropWindowToolUI.py @@ -50,7 +50,7 @@ masked area which can be adjusted using drag and drop. Note that the view must be locked to a render camera for this tool to be used. - Additionally, an upstream node much be capable of setting the crop window so + Additionally, an upstream node must be capable of setting the crop window so that there is something to adjust - typically this will be a StandardOptions node. The name of the plug being manipulated is displayed underneath the cropped area - it can be used to verify that the expected node is being adjusted. From 429a8c16f701bffb963c431dff848d273df9797e Mon Sep 17 00:00:00 2001 From: Goran Kocov Date: Sun, 5 May 2024 15:16:43 -0400 Subject: [PATCH 6/6] 3Delight multipart render support --- python/IECoreDelightTest/RendererTest.py | 38 ++++++++++++++++++++++++ src/IECoreDelight/Renderer.cpp | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/python/IECoreDelightTest/RendererTest.py b/python/IECoreDelightTest/RendererTest.py index 90442048335..e933ae17a9b 100644 --- a/python/IECoreDelightTest/RendererTest.py +++ b/python/IECoreDelightTest/RendererTest.py @@ -50,6 +50,7 @@ import IECoreScene import IECoreDelight import IECoreVDB +import IECoreImage import GafferTest import GafferScene @@ -101,6 +102,43 @@ def testOutput( self ) : self.assertTrue( ( self.temporaryDirectory() / "beauty.exr" ).exists() ) + def testOutputMultipart( self ) : + + r = GafferScene.Private.IECoreScenePreview.Renderer.create( + "3Delight", + GafferScene.Private.IECoreScenePreview.Renderer.RenderType.Batch + ) + + r.output( + "layer_a", + IECoreScene.Output( + str( self.temporaryDirectory() / "multipart.exr" ), + "exr", + "rgba" + ) + ) + + r.output( + "layer_b", + IECoreScene.Output( + str( self.temporaryDirectory() / "multipart.exr" ), + "exr", + "color shader:diffuse" + ) + ) + + r.render() + del r + + self.assertTrue( ( self.temporaryDirectory() / "multipart.exr" ).exists() ) + + i = IECoreImage.ImageReader( os.path.join( self.temporaryDirectory(), "multipart.exr" ) ) + h = i.readHeader() + subimages = h['oiio:subimages'] + del i + + self.assertEqual( subimages, IECore.IntData( 2 ) ) + def testAOVs( self ) : for data, expected in { diff --git a/src/IECoreDelight/Renderer.cpp b/src/IECoreDelight/Renderer.cpp index 0ddbe55910b..56a3245764d 100644 --- a/src/IECoreDelight/Renderer.cpp +++ b/src/IECoreDelight/Renderer.cpp @@ -281,7 +281,7 @@ class DelightOutput : public IECore::RefCounted driverParams.add( { "drivername", &typePtr, NSITypeString, 0, 1, 0 } ); driverParams.add( { "imagefilename", &namePtr, NSITypeString, 0, 1, 0 } ); - m_driverHandle = DelightHandle( context, "outputDriver:" + name, ownership, "outputdriver", driverParams ); + m_driverHandle = DelightHandle( context, "outputDriver:" + output->getName(), ownership, "outputdriver", driverParams ); // Layer