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

Method setNames

src/IECoreScene/LinkedScene.cpp:877–902  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

875}
876
877SceneInterface::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
904IECore::PathMatcher LinkedScene::readSet( const SceneInterface::Name &name, bool includeDescendantSets, const Canceller *canceller ) const
905{

Calls 4

linkLocationsMethod · 0.80
insertMethod · 0.80
beginMethod · 0.45
endMethod · 0.45