MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / getCurrentTime

Method getCurrentTime

Engine/EffectInstance.cpp:5183–5204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5181}
5182
5183double
5184EffectInstance::getCurrentTime() const
5185{
5186 EffectTLSDataPtr tls = _imp->tlsData->getTLSData();
5187 AppInstancePtr app = getApp();
5188 if (!app) {
5189 return 0.;
5190 }
5191 if (!tls) {
5192 return app->getTimeLine()->currentFrame();
5193 }
5194 if (tls->currentRenderArgs.validArgs) {
5195 return tls->currentRenderArgs.time;
5196 }
5197
5198
5199 if ( !tls->frameArgs.empty() ) {
5200 return tls->frameArgs.back()->time;
5201 }
5202
5203 return app->getTimeLine()->currentFrame();
5204}
5205
5206ViewIdx
5207EffectInstance::getCurrentView() const

Callers

nothing calls this directly

Calls 5

getAppFunction · 0.85
emptyMethod · 0.80
getTLSDataMethod · 0.45
currentFrameMethod · 0.45
getTimeLineMethod · 0.45

Tested by

no test coverage detected