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

Method evaluate

Engine/EffectInstance.cpp:3067–3102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3065}
3066
3067void
3068EffectInstance::evaluate(bool isSignificant,
3069 bool refreshMetadatas)
3070{
3071 NodePtr node = getNode();
3072
3073 if ( refreshMetadatas && node->isNodeCreated() ) {
3074 refreshMetadata_public(true);
3075 }
3076
3077 /*
3078 We always have to trigger a render because this might be a tree not connected via a link to the knob who changed
3079 but just an expression
3080
3081 if (reason == eValueChangedReasonSlaveRefresh) {
3082 //do not trigger a render, the master will do it already
3083 return;
3084 }*/
3085
3086
3087 double time = getCurrentTime();
3088 std::list<ViewerInstance* > viewers;
3089 node->hasViewersConnected(&viewers);
3090 for (std::list<ViewerInstance* >::iterator it = viewers.begin();
3091 it != viewers.end();
3092 ++it) {
3093 if (isSignificant) {
3094 (*it)->renderCurrentFrame(true);
3095 } else {
3096 (*it)->redrawViewer();
3097 }
3098 }
3099 if (isSignificant) {
3100 node->refreshPreviewsRecursivelyDownstream(time);
3101 }
3102} // evaluate
3103
3104bool
3105EffectInstance::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