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

Method remappedLinkTime

src/IECoreScene/LinkedScene.cpp:1152–1177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1150}
1151
1152double LinkedScene::remappedLinkTime( double time ) const
1153{
1154 if( m_mainScene->hasAttribute( timeLinkAttribute ) )
1155 {
1156 ConstDoubleDataPtr t = runTimeCast< const DoubleData >( m_mainScene->readAttribute( timeLinkAttribute, time ) );
1157 if ( !t )
1158 {
1159 throw Exception( "Invalid time when querying for time remapping!" );
1160 }
1161 return t->readable();
1162 }
1163 else
1164 {
1165 ConstCompoundDataPtr d = runTimeCast< const CompoundData >( m_mainScene->readAttribute( linkAttribute, time ) );
1166 if( !d )
1167 {
1168 throw Exception( "Invalid time when querying for time remapping!" );
1169 }
1170 ConstDoubleDataPtr t = d->member<DoubleData>( g_time );
1171 if( !t )
1172 {
1173 throw Exception( "Invalid time when querying for time remapping!" );
1174 }
1175 return t->readable();
1176 }
1177}
1178
1179double LinkedScene::remappedLinkTimeAtSample( size_t sampleIndex ) const
1180{

Callers

nothing calls this directly

Calls 3

readableMethod · 0.80
hasAttributeMethod · 0.45
readAttributeMethod · 0.45

Tested by

no test coverage detected