DD::Image::Execute Class Reference

Public Types

typedef unsigned ExecuteVersion
 

Public Member Functions

OpgenerateOp (Op *op, int inputnumber, double frame, int view=0)
 
void reset ()
 
void setVersion (int newVersion)
 
int getVersion () const
 

Friends

class ExecuteImplementation
 

Detailed Description

An "execution context". It is used to ask Nuke to generate a tree of Ops that will remain locked (ie not changed by any other execution contexts, though maybe shared by them) until the Execute is destroyed.

This is used to look at multiple frames (a "clip") of an operator's input. To do this a DD::Image::Op should: Unless you want to compare each frame to the current one, make Op::split_input() return -1. This indicates that Nuke should not lock ops for that input when building the tree, so they can be reused for this. If the output does not depend on the current frame (such as an operator that averages a fixed range together) you should also make Op::input_frame() return a constant. Otherwise the hash will vary depending on the frame number, causing it to recalculate as the user changes frames. To look at all the frames, the open() or execute() should create an Execute (usually as a local variable), then inside the loop it should call reset() and then generateOp() for each frame.

Member Function Documentation

Op* DD::Image::Execute::generateOp ( Op op,
int  inputnumber,
double  frame,
int  view = 0 
)
inline

Produce input n of op at frame frame. This Op will be "locked" and will not be altered until the Execute is destroyed or reset() is called.

void DD::Image::Execute::reset ( )
inline

Same as destroy+create of a new Execute, but slightly more efficient. All previous Ops from generateOp calls are unlocked and can be reused by this or other calls. In a typical loop you would call this after processing each frame number.



©2019 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.thefoundry.co.uk