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

Function transformTimeForNode

Gui/ViewerTabPrivate.cpp:258–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256} // ViewerTabPrivate::getOverlayTransform
257
258static double
259transformTimeForNode(EffectInstance* currentNode,
260 int inputNb,
261 double inTime)
262{
263 U64 nodeHash = currentNode->getHash();
264 FramesNeededMap framesNeeded = currentNode->getFramesNeeded_public(nodeHash, inTime, ViewIdx(0), 0);
265 FramesNeededMap::iterator foundInput0 = framesNeeded.find(inputNb /*input*/);
266
267 if ( foundInput0 == framesNeeded.end() ) {
268 return inTime;
269 }
270
271 FrameRangesMap::iterator foundView0 = foundInput0->second.find( ViewIdx(0) );
272 if ( foundView0 == foundInput0->second.end() ) {
273 return inTime;
274 }
275
276 if ( foundView0->second.empty() ) {
277 return inTime;
278 } else {
279 return (foundView0->second.front().min);
280 }
281}
282
283bool
284ViewerTabPrivate::getTimeTransform(double time,

Callers 1

getTimeTransformMethod · 0.85

Calls 6

emptyMethod · 0.80
ViewIdxClass · 0.50
getHashMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected