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

Method expandLink

src/IECoreScene/LinkedScene.cpp:1123–1150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1121}
1122
1123ConstSceneInterfacePtr LinkedScene::expandLink( const StringData *fileName, const InternedStringVectorData *root, int &linkDepth )
1124{
1125 if ( fileName && root )
1126 {
1127 ConstSceneInterfacePtr l = nullptr;
1128 try
1129 {
1130 l = SharedSceneInterfaces::get( fileName->readable() );
1131 }
1132 catch ( IECore::Exception &e )
1133 {
1134 IECore::msg( IECore::MessageHandler::Error, "LinkedScene::expandLink", std::string( e.what() ) + " when expanding link from file \"" + m_mainScene->fileName() + "\"" );
1135 linkDepth = 0;
1136 return nullptr;
1137 }
1138
1139 linkDepth = root->readable().size();
1140 l = l->scene(root->readable(), NullIfMissing);
1141 if ( !l )
1142 {
1143 // \todo Consider throwing or printing error message.
1144 linkDepth = 0;
1145 }
1146 return l;
1147 }
1148 linkDepth = 0;
1149 return nullptr;
1150}
1151
1152double LinkedScene::remappedLinkTime( double time ) const
1153{

Callers

nothing calls this directly

Calls 6

readableMethod · 0.80
whatMethod · 0.80
getFunction · 0.50
fileNameMethod · 0.45
sizeMethod · 0.45
sceneMethod · 0.45

Tested by

no test coverage detected