| 1121 | } |
| 1122 | |
| 1123 | ConstSceneInterfacePtr 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 | |
| 1152 | double LinkedScene::remappedLinkTime( double time ) const |
| 1153 | { |