MCPcopy Create free account
hub / github.com/MrKepzie/Natron / evaluate

Method evaluate

Engine/EffectInstance.cpp:3033–3068  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3031}
3032
3033void
3034EffectInstance::evaluate(bool isSignificant,
3035 bool refreshMetadatas)
3036{
3037 NodePtr node = getNode();
3038
3039 if ( refreshMetadatas && node->isNodeCreated() ) {
3040 refreshMetadata_public(true);
3041 }
3042
3043 /*
3044 We always have to trigger a render because this might be a tree not connected via a link to the knob who changed
3045 but just an expression
3046
3047 if (reason == eValueChangedReasonSlaveRefresh) {
3048 //do not trigger a render, the master will do it already
3049 return;
3050 }*/
3051
3052
3053 double time = getCurrentTime();
3054 std::list<ViewerInstance* > viewers;
3055 node->hasViewersConnected(&viewers);
3056 for (std::list<ViewerInstance* >::iterator it = viewers.begin();
3057 it != viewers.end();
3058 ++it) {
3059 if (isSignificant) {
3060 (*it)->renderCurrentFrame(true);
3061 } else {
3062 (*it)->redrawViewer();
3063 }
3064 }
3065 if (isSignificant) {
3066 node->refreshPreviewsRecursivelyDownstream(time);
3067 }
3068} // evaluate
3069
3070bool
3071EffectInstance::message(MessageTypeEnum type,

Callers

nothing calls this directly

Calls 9

getCurrentTimeFunction · 0.85
isNodeCreatedMethod · 0.80
hasViewersConnectedMethod · 0.80
redrawViewerMethod · 0.80
getNodeFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
renderCurrentFrameMethod · 0.45

Tested by

no test coverage detected