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

Method loadFps

contrib/IECoreUSD/src/IECoreUSD/SceneCacheData.cpp:867–884  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

865}
866
867void SceneCacheData::loadFps()
868{
869 // fallback fps
870 // fps is stored as float in the header when coming from a dcc.
871 float fps = 24.0f;
872 // if the cache comes from a dcc it should have the frame per second in the header
873 // todo\ we should make the header path for the frame per second (fps) more generic and also add support for Gaffer.
874 for ( auto& headerPath : { g_mayaFpsHeaderPath, g_houdiniFpsHeaderPath } )
875 {
876 auto header = m_sceneio->directory( headerPath, IndexedIO::MissingBehaviour::NullIfMissing );
877 if ( header )
878 {
879 header->read( "value", fps );
880 break;
881 }
882 }
883 m_fps = double( fps );
884}
885
886double SceneCacheData::timeToFrame( double time ) const
887{

Callers

nothing calls this directly

Calls 2

directoryMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected