Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
dc9585a
SceneCacheFileFormat: Handle invalid file path.
lucienfostier Sep 4, 2025
a90a7e7
SceneCacheFileFormatTest: Test invalid path.
lucienfostier Sep 5, 2025
2e0520d
SceneCacheData: Add support for root location tags added to the inter…
lucienfostier Sep 4, 2025
35a1149
SceneCacheFileFormat: Add support for collection stored on the intern…
lucienfostier Sep 3, 2025
ddd1038
SceneCacheFileFormatTest: Test support for root location tags.
lucienfostier Sep 4, 2025
1812557
Changes: Added changes for root tag improvements in IECoreUSD
lucienfostier Sep 5, 2025
549f93b
CI : Reinstate `macos-arm64` job
murraystevenson Sep 7, 2025
d47533b
CI : Set `PYTHONHOME` on macOS
murraystevenson Sep 7, 2025
dedb701
Merge pull request #1484 from murraystevenson/macCI10.6
johnhaddon Sep 8, 2025
8a67e65
Merge pull request #1483 from lucienfostier/rootTagSupportIECoreUSD
lucienfostier Sep 8, 2025
5367786
Bump version to 10.5.15.4
Sep 8, 2025
e717efc
fix
Sep 8, 2025
8245d44
SceneCacheFileFormat: Handle invalid file path.
lucienfostier Sep 4, 2025
565a8f9
SceneCacheFileFormatTest: Test invalid path.
lucienfostier Sep 5, 2025
3c4aacc
SceneCacheData: Add support for root location tags added to the inter…
lucienfostier Sep 4, 2025
2d86a9a
SceneCacheFileFormat: Add support for collection stored on the intern…
lucienfostier Sep 3, 2025
1820df9
SceneCacheFileFormatTest: Test support for root location tags.
lucienfostier Sep 4, 2025
8062e44
Changes: Added changes for root tag improvements in IECoreUSD
lucienfostier Sep 5, 2025
74a9e63
Merge pull request #1486 from lucienfostier/forwardMergeTo10_6
lucienfostier Sep 9, 2025
906a68e
Merge branch 'RB-10.6' into 10.5_forward_merge_10.6
lucienfostier Sep 9, 2025
d11640d
Merge pull request #1488 from ImageEngine/10.5_forward_merge_10.6
lucienfostier Sep 9, 2025
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
12 changes: 11 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ jobs:
linux-gcc11,
linux-debug-gcc11,
windows,
windows-debug
windows-debug,
macos-arm64
]

include:
Expand Down Expand Up @@ -76,6 +77,15 @@ jobs:
publish: false
jobs: 4

- name: macos-arm64
os: macos-14
buildType: RELEASE
options: .github/workflows/main/options.posix
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/10.0.0/gafferDependencies-10.0.0-macos-arm64.tar.gz
tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB
publish: true
jobs: 3

runs-on: ${{ matrix.os }}

container: ${{ matrix.containerImage }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/main/options.posix
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@ ENV_VARS_TO_IMPORT = "PATH CI"

if platform.system() == "Darwin" :
os.environ["DYLD_FRAMEWORK_PATH"] = libs
ENV_VARS_TO_IMPORT += " DYLD_FRAMEWORK_PATH"
os.environ["PYTHONHOME"] = libs + "/Python.framework/Versions/" + pythonABIVersion
ENV_VARS_TO_IMPORT += " DYLD_FRAMEWORK_PATH PYTHONHOME"
15 changes: 14 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,23 @@ Breaking Changes
- Removed support for `IECORE_RTLD_GLOBAL` environment variable.
- SmoothSkinningData : Removed, along with all associated Ops and Parameters.

10.5.x.x (relative to 10.5.15.3)
10.5.x.x (relative to 10.5.15.4)
=======



10.5.15.4 (relative to 10.5.15.3)
========

Improvements
-----

- IECoreUSD: Added support for root level tags (reading/writing) to our IECoreUSD::SceneCacheData plugin.

Fixes
-----

- IECoreUSD: Fixed crash when using invalid file path with IECoreUSD::SceneCacheFileFormat.

10.5.15.3 (relative to 10.5.15.2)
=========
Expand Down
24 changes: 22 additions & 2 deletions contrib/IECoreUSD/src/IECoreUSD/SceneCacheData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ void SceneCacheData::addReference( ConstSceneInterfacePtr scene, SpecData& spec,
addValueClip( spec, times, actives, linkFileName, linkRootPath.GetText() );
}

void SceneCacheData::addInternalRoot( TfTokenVector children )
void SceneCacheData::addInternalRoot( TfTokenVector children, IECoreScene::ConstSceneInterfacePtr scene )
{
// add transform for internal root.
SdfPath internalRootPath = SdfPath::AbsoluteRootPath().AppendChild( SceneCacheDataAlgo::internalRootNameToken() );
Expand All @@ -237,6 +237,26 @@ void SceneCacheData::addInternalRoot( TfTokenVector children )
// steal root children
internalRootSpec.fields.push_back( FieldValuePair( SdfChildrenKeys->PrimChildren, children ) );

// add collection
FieldValuePair propertyChildren;
propertyChildren.first = SdfChildrenKeys->PropertyChildren;
TfTokenVector properties;

// we don't want to keep children tags in this case.
m_collections.clear();

SceneInterface::NameList tags;
scene->readTags( tags );
for ( auto& tag : tags )
{
m_collections[tag].push_back( internalRootPath );
}

addCollections( internalRootSpec, properties, internalRootPath );

propertyChildren.second = properties;
internalRootSpec.fields.push_back( propertyChildren );

m_data[internalRootPath] = internalRootSpec;
}

Expand Down Expand Up @@ -344,7 +364,7 @@ void SceneCacheData::loadSceneIntoCache( ConstSceneInterfacePtr scene )
// end timecode
spec.fields.push_back( FieldValuePair( SdfFieldKeys->EndTimeCode, lastFrame ) );

addInternalRoot( children );
addInternalRoot( children, scene );

// add internal root as single child
children.clear();
Expand Down
2 changes: 1 addition & 1 deletion contrib/IECoreUSD/src/IECoreUSD/SceneCacheData.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class SceneCacheData : public SdfAbstractData
void addCollections( SpecData& spec, TfTokenVector& properties, const SdfPath& primPath );
void addReference( IECoreScene::ConstSceneInterfacePtr scene, SpecData& spec, TfTokenVector& children );
void addValueClip( SpecData& spec, const VtVec2dArray times, const VtVec2dArray actives, const std::string& assetPath, const std::string& primPath);
void addInternalRoot( TfTokenVector children );
void addInternalRoot( TfTokenVector children, IECoreScene::ConstSceneInterfacePtr scene );

VtValue getTimeSampleMap( const SdfPath& path, const TfToken& field, const VtValue& value ) const;

Expand Down
17 changes: 17 additions & 0 deletions contrib/IECoreUSD/src/IECoreUSD/SceneCacheFileFormat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ bool UsdSceneCacheFileFormat::WriteToFile( const SdfLayer& layer, const std::str
SceneInterfacePtr outScene;

outScene = SdfFileFormatSharedSceneWriters::get( filePath );
if ( !outScene )
{
IECore::msg( IECore::Msg::Error, "UsdSceneCacheFileFormat::WriteToFile", boost::format( "Invalid file path \"%s\" for layer \"%s\"." ) % filePath % layer.GetIdentifier() );
return false;
}

SceneInterface::NameList childNames;
usdScene->childNames( childNames );
Expand Down Expand Up @@ -370,6 +375,18 @@ void UsdSceneCacheFileFormat::writeLocation(
}
}
}
// internal root is mapped to the SceneInterface root '/'
else
{
SceneInterface::NameList tags;
inChild->readTags( tags );
// round trip internal tag name
for ( auto& tag : tags )
{
tag = SceneCacheDataAlgo::fromInternalName( tag );
}
outChild->writeTags( tags );
}

// recursion
SceneInterface::NameList grandChildNames;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "SdfFileFormatSharedSceneWriters.h"

#include "IECore/LRUCache.h"
#include "IECore/MessageHandler.h"

using namespace IECore;
using namespace IECoreScene;
Expand All @@ -61,7 +62,15 @@ class Cache : public SceneLRUCache

static SceneInterfacePtr fileCacheGetter( const std::string &fileName, size_t &cost )
{
SceneInterfacePtr result = SceneInterface::create( fileName, IECore::IndexedIO::Write );
SceneInterfacePtr result = nullptr;
try
{
result = SceneInterface::create( fileName, IECore::IndexedIO::Write );
}
catch ( ... )
{
IECore::msg( IECore::Msg::Error, "SdfFileFormatSharedSceneWriters::SceneLRUCache", boost::format( "Unable to open file path \"%s\" for writing IndexedIo data." ) % fileName );
}
cost = 1;
return result;
}
Expand Down
26 changes: 26 additions & 0 deletions contrib/IECoreUSD/test/IECoreUSD/SceneCacheFileFormatTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ def testTagsLoadedAsCollections( self ):
# includes
fileName = os.path.join( self.temporaryDirectory(), "testUSDTags.scc" )
m = IECoreScene.SceneCache( fileName, IECore.IndexedIO.OpenMode.Write )
m.writeTags( ["geoId:chessy"] )
t = m.createChild( "t" )
s = t.createChild( "s" )
t.writeTags( ["t1", "all", "asset-(12)"] )
Expand All @@ -330,6 +331,16 @@ def testTagsLoadedAsCollections( self ):
stage = pxr.Usd.Stage.Open( fileName )
root = stage.GetPseudoRoot()

tagInternalRootPrim = root.GetPrimAtPath( f"/{IECoreUSD.SceneCacheDataAlgo.internalRootName()}" )
self.assertEqual(
tagInternalRootPrim.GetRelationship(
"collection:{}:includes".format(
IECoreUSD.SceneCacheDataAlgo.toInternalName( "geoId:chessy" )
)
).GetTargets(),
[ pxr.Sdf.Path( f"/{IECoreUSD.SceneCacheDataAlgo.internalRootName()}" ) ]
)

tagPrim = root.GetPrimAtPath( "/{}/t".format( IECoreUSD.SceneCacheDataAlgo.internalRootName() ) )
self.assertTrue( tagPrim )

Expand All @@ -346,6 +357,10 @@ def testTagsLoadedAsCollections( self ):
stage.Export( exportPath )

scene = IECoreScene.SharedSceneInterfaces.get( exportPath )
# check root tags
self.assertTrue( "geoId:chessy" in scene.readTags() )

# check children tags
for tag, paths in tags.items():
for path in paths:
child = scene.scene( IECoreScene.SceneInterface.stringToPath( path ) )
Expand Down Expand Up @@ -939,6 +954,17 @@ def testSceneWrite( self ):
stage.Export( exportPath )
self.assertTrue( os.path.exists( exportPath ) )

# invalid path
invalidExportPath = os.path.join( self.temporaryDirectory(), "invalid", "invalid.scc" )
with IECore.CapturingMessageHandler() as mh :
stage.Export( invalidExportPath )

self.assertEqual( len( mh.messages ), 2 )
self.assertEqual( mh.messages[0].level, IECore.Msg.Level.Error )
self.assertEqual( mh.messages[0].context, "SdfFileFormatSharedSceneWriters::SceneLRUCache" )
self.assertEqual( mh.messages[1].level, IECore.Msg.Level.Error )
self.assertEqual( mh.messages[1].context, "UsdSceneCacheFileFormat::WriteToFile" )

# root
layer = pxr.Sdf.Layer.FindOrOpen( linkFileName )

Expand Down