Skip to content

Commit

Permalink
Adding the minimal amount of changes to support Gaffer 0.56.x.x
Browse files Browse the repository at this point in the history
  • Loading branch information
boberfly committed Mar 29, 2020
1 parent 5a7a583 commit ff0fc03
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

parser.add_argument(
"--gafferVersion",
default = "0.55.4.0",
default = "0.56.1.0",
help = "The version of Gaffer to build against. "
)

Expand Down
2 changes: 1 addition & 1 deletion build_docker_optix.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

python build.py --version 0.18.0 --cyclesVersion 0.17.0 --optix 1 --docker 1 --experimental 0 --upload 0 $@
python build.py --version 0.18.1 --cyclesVersion 0.17.0 --optix 1 --docker 1 --experimental 0 --upload 0 $@
5 changes: 5 additions & 0 deletions include/GafferCycles/CyclesLight.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include "GafferCycles/TypeIds.h"

#include "GafferScene/Light.h"
#include "Gaffer/Version.h"

namespace GafferCycles
{
Expand All @@ -60,7 +61,11 @@ class GAFFERCYCLES_API CyclesLight : public GafferScene::Light
protected :

void hashLight( const Gaffer::Context *context, IECore::MurmurHash &h ) const override;
#ifdef GAFFER_MAJOR_VERSION >= 56
IECoreScene::ConstShaderNetworkPtr computeLight( const Gaffer::Context *context ) const override;
#else
IECoreScene::ShaderNetworkPtr computeLight( const Gaffer::Context *context ) const override;
#endif

private :

Expand Down
4 changes: 4 additions & 0 deletions src/GafferCycles/CyclesLight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ void CyclesLight::hashLight( const Gaffer::Context *context, IECore::MurmurHash
shaderNamePlug()->hash( h );
}

#ifdef GAFFER_MAJOR_VERSION >= 56
IECoreScene::ConstShaderNetworkPtr CyclesLight::computeLight( const Gaffer::Context *context ) const
#else
IECoreScene::ShaderNetworkPtr CyclesLight::computeLight( const Gaffer::Context *context ) const
#endif
{
IECoreScene::ShaderNetworkPtr result = new IECoreScene::ShaderNetwork;
// Light shader
Expand Down

0 comments on commit ff0fc03

Please sign in to comment.