| 865 | } |
| 866 | |
| 867 | void 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 | |
| 886 | double SceneCacheData::timeToFrame( double time ) const |
| 887 | { |