Nuke binary plugins 15.1.3
 
Loading...
Searching...
No Matches
DD::Image::OutputContext Class Reference

#include <OutputContext.h>

Inheritance diagram for DD::Image::OutputContext:
DD::Image::ProxyContext

Public Types

enum  LineReadPreference { eScanlineAlways , ePreferScanline , ePreferAllLines }
 
- Public Types inherited from DD::Image::ProxyContext
enum  ProxySetting {
  PROXY_OFF , PROXY_NEVER , PROXY_SCALE_DOWN , PROXY_NEAREST ,
  PROXY_ALWAYS
}
 

Public Member Functions

 OutputContext ()
 Default ctor sets frame=0.0, view=0, and lineReadPreference=ePreferScanline.
 
 OutputContext (double frame, int view=-1)
 
 OutputContext (double frame, int view, const GsvScopePtr gsvScope)
 
double frame () const
 
void setFrame (double v)
 
int view () const
 
void setView (int v)
 
 mFnDeprecatedInNuke14 ("view has been deprecated, use setView instead.") void view(int v)
 
void setGsvScope (const GsvScopePtr scope)
 Sets a GsvScope to the OutputContext.
 
GsvScopePtr gsvScope () const
 
const GsvScopeId & gsvScopeId () const
 
void setLineReadPreference (LineReadPreference linePreference)
 
LineReadPreference lineReadPreference () const
 
void append (Hash &) const
 
bool operator== (const OutputContext &b) const
 
bool operator!= (const OutputContext &b) const
 
bool operator< (const OutputContext &b) const
 
bool operator> (const OutputContext &b) const
 
const std::string & viewname () const
 
const Formatto_proxy_rel (const Format &from, Format &to, const OutputContext &rel) const
 
bool sameProxy (const DD::Image::OutputContext &b) const
 
- Public Member Functions inherited from DD::Image::ProxyContext
ProxySetting proxy () const
 
void setProxy (ProxySetting v)
 
float scale_x () const
 
float scale_y () const
 
float translate_x () const
 
float translate_y () const
 
void set (ProxySetting v, float sx, float sy, float tx, float ty)
 Set all proxy parameters.
 
void setProxyscale (float scale)
 
void setProxyscale (float sx, float sy)
 
void setProxyscale (const Format &fullsize, const Format &proxysize)
 
void setProxyscale (const Matrix4 &)
 
void scale (float scale)
 
void scale (float sx, float sy)
 
void translate (float x, float y)
 
bool isIdentity () const
 
void to_proxy (Matrix4 &) const
 
void to_proxy_wh (double &w, double &h) const
 
void to_proxy_wh (float &w, float &h) const
 
double to_proxy_w (double w) const
 
double to_proxy_h (double w) const
 
void to_proxy_xy (double &x, double &y) const
 
void to_proxy_xy (float &x, float &y) const
 
double to_proxy_x (double w) const
 
double to_proxy_y (double w) const
 
double from_proxy_x (double x) const
 
double from_proxy_y (double y) const
 
void to_proxy_box (DD::Image::Box &box) const
 
void to_proxy_area (double &w, double &h) const
 
double to_proxy_area (double area) const
 
void to_proxy (const Format &from, Format &to) const
 
const Formatto_proxy_rel (const Format &from, Format &to, const ProxyContext &) const
 
double to_proxy_pixel_aspect (double pa) const
 
void from_proxy (Matrix4 &) const
 
void from_proxy_xy (double &x, double &y) const
 
void from_proxy_wh (double &w, double &h) const
 
void from_proxy_xy (float &x, float &y) const
 
void from_proxy_wh (float &w, float &h) const
 
double from_proxy_area (double area) const
 
double from_proxy_pixel_aspect (double pa) const
 
void appendProxy (Hash &hash) const
 Append the values affecting proxy scaling to the hash (i.e. not frame or view)
 

Static Public Member Functions

static const OutputContextdefaultContext ()
 
static GsvScopePtr gsvScope (const GsvScopeId &gsvScopeId)
 
static const std::string & viewname (int v)
 
static const std::string & viewshort (int v)
 
static int viewcount ()
 
static bool MultiView ()
 
static int lookup_view (const std::string &viewname)
 
static void set_viewnames (const std::string &s)
 

Static Public Attributes

static void(* create_view )(const std::string &s)
 
static GsvRepositoryPtr(* gsvRepository )()
 Returns the GsvRepository in use by Nuke.
 
static int(* viewIndex )(const std::string &viewName, Op *op)
 
static void(* createView )(const std::string &viewName, const std::string &color, Op *op)
 
static const std::string &(* viewName )(int index, Op *op)
 
static std::string(* viewShortName )(int index, Op *op)
 
static void(* setViewNames )(const std::vector< std::string > &viewNames, Op *op)
 Sets the op's root node to have view's named viewNames.
 
static int(* viewCount )(Op *op)
 Returns the number of views on the op's root node.
 
static bool(* hasMultipleViews )(Op *op)
 Returns true if op's root node has more than one view.
 

Friends

std::ostream & operator<< (std::ostream &, const OutputContext &)
 

Additional Inherited Members

- Protected Member Functions inherited from DD::Image::ProxyContext
 ProxyContext ()
 
bool isEqualTo (const ProxyContext &other) const
 
bool isLessThan (const ProxyContext &other) const
 

Detailed Description

This is a block of data that is passed up the Op tree. The context modifies the values that are stored by knobs. An Op can further use information from it (such as the frame number) to modify it's behavior, by implementing Op::setOutputContext(). And an Op can modify the context that is used by each input, by implementing Op::inputContext().

Member Enumeration Documentation

◆ LineReadPreference

Preferences which can be used to influence how files are read by Readers. eScanlineAlways - upstream Reader should always read frames line by line. ePreferScanline - prefer line-by-line reads, but allow other nodes upstream to override this preference. ePreferAllLines - prefer to read the whole of the requested area at once, but allow other nodes upstream to override this preference.

Member Function Documentation

◆ gsvScope() [1/2]

GsvScopePtr OutputContext::gsvScope ( ) const

Returns the GsvScope held by the OutputContext. The GsvScopePtr can be an empty shared pointer, which means that the GsvScope is nonexisting.

References gsvScope().

Referenced by gsvScope().

◆ gsvScopeId()

const GsvScopeId & OutputContext::gsvScopeId ( ) const

Returns the unique ID for the scope held by the OutputContext. Same as calling gsvScope()->id().

Referenced by DD::Image::MaterialOpI::buildAssetPath(), and gsvScope().

◆ gsvScope() [2/2]

GsvScopePtr OutputContext::gsvScope ( const GsvScopeId &  gsvScopeId)
static

Retrieves a GsvScope from the repository. This is equivalent to: OutputContext::gsvRepository()->get(gsvScopeId).

References gsvRepository, and gsvScopeId().

◆ setLineReadPreference()

void OutputContext::setLineReadPreference ( LineReadPreference  linePreference)

By default readers read frames line by line (ePreferScanline). Some formats support reading the entire frame in one go. Setting the lineReadPreference can be used to switch between the two modes for these formats.

Referenced by DD::Image::Write::inputContext().

◆ append()

void OutputContext::append ( Hash hash) const

Add the contents of this to the hash, thus producing a different hash for any different setting of OutputContext.

◆ viewcount()

int OutputContext::viewcount ( )
static

how many views exist. View 0 is always an extra view called 'default'. If there is one view, this is will be view 1.

Referenced by MultiView().

◆ MultiView()

bool OutputContext::MultiView ( )
static

whether or not there are more than one actual view (not counting the hidden 'default' view)

References viewcount().

Member Data Documentation

◆ viewIndex

int(* OutputContext::viewIndex)(const std::string &viewName, Op *op)
static

If a view exists with name viewName on op's root node then that view's index is returned, otherwise -1 is returned.

◆ createView

void(* OutputContext::createView)(const std::string &viewName, const std::string &color, Op *op)
static

Creates a new view with name viewName and color on op's root node.

◆ viewName

const std::string &(* OutputContext::viewName)(int index, Op *op)
static

If a view exists at index on op's root node then that view's name is returned, otherwise an empty string is returned.

◆ viewShortName

std::string(* OutputContext::viewShortName)(int index, Op *op)
static

If a view exists at index on op's root node then that view's short name is returned, otherwise an empty string is returned.



©2024 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.foundry.com