MCPcopy Create free account
hub / github.com/ImageEngine/cortex / LinkedScene

Method LinkedScene

src/IECoreScene/LinkedScene.cpp:78–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78LinkedScene::LinkedScene( const std::string &fileName, IndexedIO::OpenMode mode )
79 : m_mainScene( nullptr ),
80 m_linkedScene( nullptr ),
81 m_rootLinkDepth( 0 ),
82 m_readOnly( mode & IndexedIO::Read ),
83 m_atLink( false ),
84 m_sampled( true ),
85 m_timeRemapped( false ),
86 m_linkLocationsData( new IECore::PathMatcherData() )
87{
88 if( mode & IndexedIO::Append )
89 {
90 throw InvalidArgumentException( "Append mode not supported" );
91 }
92
93 m_mainScene = new SceneCache( fileName, mode );
94
95 if( m_readOnly && m_mainScene->hasAttribute( "linkLocations" ) )
96 {
97 IECore::ConstObjectPtr linkLocationObj = m_mainScene->readAttribute( g_linkLocations, 0 );
98 m_linkLocationsData = runTimeCast<const IECore::PathMatcherData>( linkLocationObj.get() )->copy();
99 }
100
101}
102
103LinkedScene::LinkedScene( ConstSceneInterfacePtr mainScene )
104 : m_mainScene( const_cast<SceneInterface *>(mainScene.get()) ),

Callers 15

testLinkedSceneCacheMethod · 0.80
testSceneWriteMethod · 0.80
testLinksTimeOffsetMethod · 0.80
testConstructorsMethod · 0.80
testWritingMethod · 0.80
testTimeRemappingMethod · 0.80
readSavedScenesMethod · 0.80
testTagsMethod · 0.80

Calls 6

InvalidArgumentExceptionFunction · 0.85
readOnlyMethod · 0.80
hasAttributeMethod · 0.45
readAttributeMethod · 0.45
copyMethod · 0.45
getMethod · 0.45

Tested by 15

testLinkedSceneCacheMethod · 0.64
testSceneWriteMethod · 0.64
testLinksTimeOffsetMethod · 0.64
testConstructorsMethod · 0.64
testWritingMethod · 0.64
testTimeRemappingMethod · 0.64
readSavedScenesMethod · 0.64
testTagsMethod · 0.64