| 875 | } |
| 876 | |
| 877 | SceneInterface::NameList LinkedScene::setNames( bool includeDescendantSets ) const |
| 878 | { |
| 879 | if( m_linkedScene ) |
| 880 | { |
| 881 | return m_linkedScene->setNames( includeDescendantSets ); |
| 882 | } |
| 883 | else |
| 884 | { |
| 885 | if ( !includeDescendantSets ) |
| 886 | { |
| 887 | return NameList(); |
| 888 | } |
| 889 | |
| 890 | SceneInterface::NameList setNames = m_mainScene->setNames( includeDescendantSets ); |
| 891 | |
| 892 | const PathMatcher links = runTimeCast<const LinkedScene>( scene( SceneInterface::rootPath ) )->linkLocations(); |
| 893 | for( PathMatcher::Iterator it = links.begin(); it != links.end(); ++it ) |
| 894 | { |
| 895 | SceneInterface::NameList linkedSceneSetNames = scene( *it, SceneInterface::ThrowIfMissing )->setNames(); |
| 896 | setNames.insert( setNames.begin(), linkedSceneSetNames.begin(), linkedSceneSetNames.end() ); |
| 897 | } |
| 898 | |
| 899 | std::sort( setNames.begin(), setNames.end() ); |
| 900 | return NameList( setNames.begin(), std::unique( setNames.begin(), setNames.end() ) ); |
| 901 | } |
| 902 | } |
| 903 | |
| 904 | IECore::PathMatcher LinkedScene::readSet( const SceneInterface::Name &name, bool includeDescendantSets, const Canceller *canceller ) const |
| 905 | { |