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

Function recomputeFrameRangeForAllReadersInternal

Engine/NodeGroup.cpp:950–977  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

948}
949
950static void
951recomputeFrameRangeForAllReadersInternal(NodeCollection* group,
952 int* firstFrame,
953 int* lastFrame,
954 bool setFrameRange)
955{
956 NodesList nodes = group->getNodes();
957
958 for (NodesList::iterator it = nodes.begin(); it != nodes.end(); ++it) {
959 if ( (*it)->isActivated() ) {
960 if ( (*it)->getEffectInstance()->isReader() ) {
961 double thisFirst, thislast;
962 (*it)->getEffectInstance()->getFrameRange_public( (*it)->getHashValue(), &thisFirst, &thislast );
963 if (thisFirst != std::numeric_limits<int>::min()) {
964 *firstFrame = setFrameRange ? thisFirst : std::min(*firstFrame, (int)thisFirst);
965 }
966 if (thislast != std::numeric_limits<int>::max()) {
967 *lastFrame = setFrameRange ? thislast : std::max(*lastFrame, (int)thislast);
968 }
969 } else {
970 NodeGroup* isGrp = (*it)->isEffectGroup();
971 if (isGrp) {
972 recomputeFrameRangeForAllReadersInternal(isGrp, firstFrame, lastFrame, false);
973 }
974 }
975 }
976 }
977}
978
979void
980NodeCollection::recomputeFrameRangeForAllReaders(int* firstFrame,

Callers 1

Calls 9

maxFunction · 0.85
getNodesMethod · 0.80
getEffectInstanceMethod · 0.80
getFrameRange_publicMethod · 0.80
getHashValueMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
isActivatedMethod · 0.45
isReaderMethod · 0.45

Tested by

no test coverage detected