Skip to content

Commit ff0fc03

Browse files
committed
Adding the minimal amount of changes to support Gaffer 0.56.x.x
1 parent 5a7a583 commit ff0fc03

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
parser.add_argument(
6262
"--gafferVersion",
63-
default = "0.55.4.0",
63+
default = "0.56.1.0",
6464
help = "The version of Gaffer to build against. "
6565
)
6666

build_docker_optix.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
22

3-
python build.py --version 0.18.0 --cyclesVersion 0.17.0 --optix 1 --docker 1 --experimental 0 --upload 0 $@
3+
python build.py --version 0.18.1 --cyclesVersion 0.17.0 --optix 1 --docker 1 --experimental 0 --upload 0 $@

include/GafferCycles/CyclesLight.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include "GafferCycles/TypeIds.h"
4242

4343
#include "GafferScene/Light.h"
44+
#include "Gaffer/Version.h"
4445

4546
namespace GafferCycles
4647
{
@@ -60,7 +61,11 @@ class GAFFERCYCLES_API CyclesLight : public GafferScene::Light
6061
protected :
6162

6263
void hashLight( const Gaffer::Context *context, IECore::MurmurHash &h ) const override;
64+
#ifdef GAFFER_MAJOR_VERSION >= 56
65+
IECoreScene::ConstShaderNetworkPtr computeLight( const Gaffer::Context *context ) const override;
66+
#else
6367
IECoreScene::ShaderNetworkPtr computeLight( const Gaffer::Context *context ) const override;
68+
#endif
6469

6570
private :
6671

src/GafferCycles/CyclesLight.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,11 @@ void CyclesLight::hashLight( const Gaffer::Context *context, IECore::MurmurHash
102102
shaderNamePlug()->hash( h );
103103
}
104104

105+
#ifdef GAFFER_MAJOR_VERSION >= 56
106+
IECoreScene::ConstShaderNetworkPtr CyclesLight::computeLight( const Gaffer::Context *context ) const
107+
#else
105108
IECoreScene::ShaderNetworkPtr CyclesLight::computeLight( const Gaffer::Context *context ) const
109+
#endif
106110
{
107111
IECoreScene::ShaderNetworkPtr result = new IECoreScene::ShaderNetwork;
108112
// Light shader

0 commit comments

Comments
 (0)