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

Method readSet

src/IECoreScene/LinkedScene.cpp:904–931  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

902}
903
904IECore::PathMatcher LinkedScene::readSet( const SceneInterface::Name &name, bool includeDescendantSets, const Canceller *canceller ) const
905{
906 if( m_linkedScene )
907 {
908 return m_linkedScene->readSet( name, includeDescendantSets, canceller );
909 }
910
911 if ( includeDescendantSets )
912 {
913 // todo only copy if we need to
914 IECore::PathMatcher result = m_mainScene->readSet( name );
915
916 const PathMatcher links = runTimeCast<const LinkedScene>( scene( SceneInterface::rootPath ) )->linkLocations();
917 for( PathMatcher::Iterator it = links.begin(); it != links.end(); ++it )
918 {
919 SceneInterface::Path p;
920 path( p );
921 std::string strPath;
922 SceneInterface::pathToString( *it, strPath );
923 IECore::PathMatcher linkedSceneSet = scene( *it, SceneInterface::ThrowIfMissing )->readSet( name );
924
925 result.addPaths( linkedSceneSet, *it );
926 }
927 return result;
928 }
929
930 return IECore::PathMatcher();
931}
932
933void LinkedScene::writeSet( const SceneInterface::Name &name, const IECore::PathMatcher &set )
934{

Calls 7

pathFunction · 0.85
pathToStringFunction · 0.85
PathMatcherFunction · 0.85
linkLocationsMethod · 0.80
addPathsMethod · 0.80
beginMethod · 0.45
endMethod · 0.45