Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
10.7.x.x (relative to 10.7.1.3)
========

Fixes
-----

- SceneCacheFileFormat : Fixed `Unsupported Spec Type for </>` error when a scene cache is added as a sublayer of a live stage.

10.7.1.3 (relative to 10.7.1.2)
========
Expand Down
5 changes: 4 additions & 1 deletion contrib/IECoreUSD/src/IECoreUSD/SceneCacheFileFormat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ UsdSceneCacheFileFormat::~UsdSceneCacheFileFormat()

SdfAbstractDataRefPtr UsdSceneCacheFileFormat::InitData( const FileFormatArguments& args ) const
{
return SceneCacheData::New( args );
SceneCacheDataRefPtr data = SceneCacheData::New( args );
// The pseudo-root spec must always exist in a layer's data.
data->CreateSpec( SdfPath::AbsoluteRootPath(), SdfSpecTypePseudoRoot );
return data;
}


Expand Down
18 changes: 18 additions & 0 deletions contrib/IECoreUSD/test/IECoreUSD/SceneCacheFileFormatTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

import pxr.Usd
import pxr.Sdf
import pxr.Tf

import imath

Expand Down Expand Up @@ -1263,5 +1264,22 @@ def testCustomAttribute( attribute ):
self.assertTrue( primitiveVariable )
self.assertEqual( primitiveVariable.interpolation, IECoreScene.PrimitiveVariable.Interpolation.Constant )

def testSubLayerIntoLiveStage( self ) :
fileName = os.path.join( self.temporaryDirectory(), "testUSDSubLayer.scc" )
m = IECoreScene.SceneCache( fileName, IECore.IndexedIO.OpenMode.Write )
t = m.createChild( "t" )
del m, t

root = pxr.Sdf.Layer.CreateAnonymous( ".usda" )
stage = pxr.Usd.Stage.Open( root )

mark = pxr.Tf.Error.Mark()
mark.SetMark()
root.subLayerPaths.append( fileName )
self.assertTrue( mark.IsClean() )

self.assertTrue( stage.GetPrimAtPath( "/__IECOREUSD_ROOT/t" ) )


if __name__ == "__main__":
unittest.main()
Loading