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

Method remappedLinkTimeAtSample

src/IECoreScene/LinkedScene.cpp:1179–1204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1177}
1178
1179double LinkedScene::remappedLinkTimeAtSample( size_t sampleIndex ) const
1180{
1181 if( m_mainScene->hasAttribute( timeLinkAttribute ) )
1182 {
1183 ConstDoubleDataPtr t = runTimeCast< const DoubleData >( static_cast<const SampledSceneInterface*>(m_mainScene.get())->readAttributeAtSample( timeLinkAttribute, sampleIndex ) );
1184 if ( !t )
1185 {
1186 throw Exception( "Invalid time when querying for time remapping!" );
1187 }
1188 return t->readable();
1189 }
1190 else
1191 {
1192 ConstCompoundDataPtr d = runTimeCast< const CompoundData >( static_cast<const SampledSceneInterface*>(m_mainScene.get())->readAttributeAtSample( linkAttribute, sampleIndex ) );
1193 if( !d )
1194 {
1195 throw Exception( "Invalid time when querying for time remapping!" );
1196 }
1197 ConstDoubleDataPtr t = d->member<DoubleData>( g_time );
1198 if( !t )
1199 {
1200 throw Exception( "Invalid time when querying for time remapping!" );
1201 }
1202 return t->readable();
1203 }
1204}
1205
1206SceneInterfacePtr LinkedScene::child( const Name &name, MissingBehaviour missingBehaviour )
1207{

Callers

nothing calls this directly

Calls 4

readableMethod · 0.80
hasAttributeMethod · 0.45
readAttributeAtSampleMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected