| 902 | } |
| 903 | |
| 904 | IECore::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 | |
| 933 | void LinkedScene::writeSet( const SceneInterface::Name &name, const IECore::PathMatcher &set ) |
| 934 | { |