Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
testRunner: sudo -E -u testUser
sconsCacheMegabytes: 400
jobs: 4
dependenciesURL: https://github.com/ImageEngine/cortex/releases/download/10.7.0.0a10/cortex-10.7.0.0a10-linux-platform24.tar.gz
dependenciesURL: https://github.com/ImageEngine/cortex/releases/download/10.7.0.0a11/cortex-10.7.0.0a11-linux-platform24.tar.gz
extraBuildArguments: CYCLES_ROOT=""

- name: windows
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main/installDependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

# Determine default archive URL.

defaultURL = "https://github.com/GafferHQ/dependencies/releases/download/11.0.0a8/gafferDependencies-11.0.0a8-{platform}-{vfxPlatform}.{extension}"
defaultURL = "https://github.com/ImageEngine/cortex/releases/download/10.7.0.0a11/cortex-10.7.0.0a11-{platform}-{vfxPlatform}.{extension}"

# Parse command line arguments.

Expand Down
13 changes: 12 additions & 1 deletion Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Features
--------

- FlamencoDispatcher : Added a new node for sending tasks to Blender's [Flamenco]((https://flamenco.blender.org) render farm manager.
- FlamencoDispatcher : Added a new node for sending tasks to Blender's [Flamenco](https://flamenco.blender.org) render farm manager.
- PrimitiveQuery : Added a new node for querying a primitive's type and variable sizes.

Fixes
Expand All @@ -17,6 +17,17 @@ API

- Image : Added `updateImage()` method.

Build
-----

- Cortex : Updated to version 10.7.0.0a11.

Breaking Changes
----------------

- SceneReader : Removed `./` prefix from relative prototype paths loaded from USD files.
- Instancer : Defaulted `GAFFERSCENE_INSTANCER_EXPLICIT_ABSOLUTE_PATHS` to `1`, as required by SceneReader's updated handling of relative USD prototypes. The environment variable may be removed in future.

1.7.0.0a2 (relative to 1.7.0.0a1)
=========

Expand Down
6 changes: 0 additions & 6 deletions bin/__private/_gaffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,6 @@ def prependToPath( pathToPrepend, envVar ) :
# Stop Cortex from making all Python modules load with RTLD_GLOBAL.
os.environ["IECORE_RTLD_GLOBAL"] = "0"

# Load USD PointInstancer prototypes as relative paths by default. This allows
# the _PointInstancerAdaptor to function even when the instancers are reparented
# in the Gaffer hierarchy.
if "IECOREUSD_POINTINSTANCER_RELATIVE_PROTOTYPES" not in os.environ :
os.environ["IECOREUSD_POINTINSTANCER_RELATIVE_PROTOTYPES"] = "1"

# Work around https://github.com/ImageEngine/cortex/issues/1338, which causes
# bad serialisations in certain locales.
os.environ["LC_NUMERIC"] = "C"
Expand Down
41 changes: 0 additions & 41 deletions include/GafferBindings/NodeBinding.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,47 +77,6 @@ class NodeWrapper : public GraphComponentWrapper<T>
{
}

bool isInstanceOf( IECore::TypeId typeId ) const override
{
// Optimise for common queries for types we know about. The standard
// wrapper implementation of `isInstanceOf()` would have to enter
// Python just in case the type was implemented there. Entering
// Python is incredibly costly for such a simple operation, and we
// perform these operations often, so these optimisations are well
// worth it.

if(
// We're a Node, so we cannot be a plug.
typeId == (IECore::TypeId)Gaffer::PlugTypeId ||
typeId == (IECore::TypeId)Gaffer::ValuePlugTypeId
)
{
return false;
}

if(
// It's important to optimise for ContextProcessor and
// Switch specifically, because they are queried heavily during
// the `Dispatcher::dispatch()` process.
typeId == (IECore::TypeId)Gaffer::ContextProcessorTypeId ||
typeId == (IECore::TypeId)Gaffer::SwitchTypeId ||
// ScriptNode, DependencyNode, ComputeNode and EditScope also
// appear on performance critical code paths.
typeId == (IECore::TypeId)Gaffer::ScriptNodeTypeId ||
typeId == (IECore::TypeId)Gaffer::ComputeNodeTypeId ||
typeId == (IECore::TypeId)Gaffer::DependencyNodeTypeId ||
typeId == (IECore::TypeId)Gaffer::EditScopeTypeId
)
{
// The types above are implemented in C++, so there is no need
// to consider Python overrides for `isInstanceOf()`. The base
// class implementation is sufficient.
return WrappedType::isInstanceOf( typeId );
}

return GraphComponentWrapper<T>::isInstanceOf( typeId );
}

bool acceptsInput( const Gaffer::Plug *plug, const Gaffer::Plug *inputPlug ) const override
{
if( this->isSubclassed() )
Expand Down
21 changes: 0 additions & 21 deletions include/GafferBindings/PlugBinding.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,27 +69,6 @@ class PlugWrapper : public GraphComponentWrapper<WrappedType>
{
}

bool isInstanceOf( IECore::TypeId typeId ) const override
{
// Optimise for common queries we know should fail.
// The standard wrapper implementation of isInstanceOf()
// would have to enter Python only to discover this inevitable
// failure as it doesn't have knowledge of the relationships
// among types. Entering Python is incredibly costly for such
// a simple operation, and we perform these operations often,
// so this optimisation is well worth it.
if(
typeId == (IECore::TypeId)Gaffer::ScriptNodeTypeId ||
typeId == (IECore::TypeId)Gaffer::NodeTypeId ||
typeId == (IECore::TypeId)Gaffer::DependencyNodeTypeId ||
typeId == (IECore::TypeId)Gaffer::ComputeNodeTypeId
)
{
return false;
}
return GraphComponentWrapper<WrappedType>::isInstanceOf( typeId );
}

bool acceptsInput( const Gaffer::Plug *input ) const override
{
if( this->isSubclassed() )
Expand Down
6 changes: 3 additions & 3 deletions python/GafferSceneTest/InstancerTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3690,17 +3690,17 @@ def testRelativePrototypePaths( self ):
self.assertEqual( instancer["out"].object( "/groupB/object/instances/sphere/0" ), rootSphere["out"].object( "/sphere" ) )
self.assertEqual( instancer["out"].object( "/groupB/object/instances/sphere1/1" ), sphereB["out"].object( "/sphere" ) )

if os.environ.get( "GAFFERSCENE_INSTANCER_EXPLICIT_ABSOLUTE_PATHS", "0" ) != "0":
if os.environ.get( "GAFFERSCENE_INSTANCER_EXPLICIT_ABSOLUTE_PATHS", "1" ) != "0":
self.assertEqual( instancer["out"].object( "/groupA/object/instances/sphere2/2" ), sphereA["out"].object( "/sphere" ) )
self.assertEqual( instancer["out"].object( "/groupB/object/instances/sphere2/2" ), sphereB["out"].object( "/sphere" ) )
else:
self.assertEqual( instancer["out"].object( "/groupA/object/instances/sphere2/2" ), rootSphere["out"].object( "/sphere" ) )
self.assertEqual( instancer["out"].object( "/groupB/object/instances/sphere2/2" ), rootSphere["out"].object( "/sphere" ) )

def testRelativePrototypePathsWithExplicitAbsolute( self ):
def testRelativePrototypePathsWithoutExplicitAbsolute( self ):
try :
env = Gaffer.environment()
env["GAFFERSCENE_INSTANCER_EXPLICIT_ABSOLUTE_PATHS"] = "1"
env["GAFFERSCENE_INSTANCER_EXPLICIT_ABSOLUTE_PATHS"] = "0"
subprocess.check_output(
[ str( Gaffer.executablePath() ), "test", "GafferSceneTest.InstancerTest.testRelativePrototypePaths" ],
stderr = subprocess.STDOUT,
Expand Down
2 changes: 1 addition & 1 deletion src/GafferScene/Instancer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ class Instancer::EngineData : public Data
m_prototypeIndexRemap.reserve( rootStrings->size() );


const static bool g_explicitAbsolutePaths = checkEnvFlag( "GAFFERSCENE_INSTANCER_EXPLICIT_ABSOLUTE_PATHS", false );
const static bool g_explicitAbsolutePaths = checkEnvFlag( "GAFFERSCENE_INSTANCER_EXPLICIT_ABSOLUTE_PATHS", true );

size_t i = 0;
ScenePlug::ScenePath path;
Expand Down
Loading