Blender  V2.93
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
blender::compositor::MaskOperation Class Reference

#include <COM_MaskOperation.h>

Inherits blender::compositor::NodeOperation.

Public Member Functions

 MaskOperation ()
 
void initExecution () override
 
void deinitExecution () override
 
void setMask (Mask *mask)
 
void setMaskWidth (int width)
 
void setMaskHeight (int height)
 
void setFramenumber (int frame_number)
 
void setFeather (bool feather)
 
void setMotionBlurSamples (int samples)
 
void setMotionBlurShutter (float shutter)
 
void executePixelSampled (float output[4], float x, float y, PixelSampler sampler) override
 calculate a single pixel More...
 
- Public Member Functions inherited from blender::compositor::NodeOperation
virtual ~NodeOperation ()
 
void set_name (const std::string name)
 
const std::string get_name () const
 
void set_id (const int id)
 
const int get_id () const
 
const NodeOperationFlags get_flags () const
 
unsigned int getNumberOfInputSockets () const
 
unsigned int getNumberOfOutputSockets () const
 
NodeOperationOutputgetOutputSocket (unsigned int index=0)
 
NodeOperationInputgetInputSocket (unsigned int index)
 
virtual bool isOutputOperation (bool) const
 isOutputOperation determines whether this operation is an output of the ExecutionSystem during rendering or editing. More...
 
void setbNodeTree (const bNodeTree *tree)
 
virtual void executeRegion (rcti *, unsigned int)
 when a chunk is executed by a CPUDevice, this method is called More...
 
virtual void executeOpenCLRegion (OpenCLDevice *, rcti *, unsigned int, MemoryBuffer **, MemoryBuffer *)
 when a chunk is executed by an OpenCLDevice, this method is called More...
 
virtual void executeOpenCL (OpenCLDevice *, MemoryBuffer *, cl_mem, MemoryBuffer **, std::list< cl_mem > *, std::list< cl_kernel > *)
 custom handle to add new tasks to the OpenCL command queue in order to execute a chunk on an GPUDevice. More...
 
void setResolution (unsigned int resolution[2])
 set the resolution More...
 
virtual bool isActiveViewerOutput () const
 is this operation the active viewer output user can select an ViewerNode to be active (the result of this node will be drawn on the backdrop). More...
 
virtual bool determineDependingAreaOfInterest (rcti *input, ReadBufferOperation *readOperation, rcti *output)
 
void setResolutionInputSocketIndex (unsigned int index)
 set the index of the input socket that will determine the resolution of this operation More...
 
virtual eCompositorPriority getRenderPriority () const
 get the render priority of this node. More...
 
bool isBraked () const
 
void updateDraw ()
 
unsigned int getWidth () const
 
unsigned int getHeight () const
 
void readSampled (float result[4], float x, float y, PixelSampler sampler)
 
void readFiltered (float result[4], float x, float y, float dx[2], float dy[2])
 
void read (float result[4], int x, int y, void *chunkData)
 
virtual void * initializeTileData (rcti *)
 
virtual void deinitializeTileData (rcti *, void *)
 
virtual MemoryBuffergetInputMemoryBuffer (MemoryBuffer **)
 
virtual std::unique_ptr< MetaDatagetMetaData ()
 

Protected Member Functions

void determineResolution (unsigned int resolution[2], unsigned int preferredResolution[2]) override
 
- Protected Member Functions inherited from blender::compositor::NodeOperation
 NodeOperation ()
 
void addInputSocket (DataType datatype, ResizeMode resize_mode=ResizeMode::Center)
 
void addOutputSocket (DataType datatype)
 
void setWidth (unsigned int width)
 
void setHeight (unsigned int height)
 
SocketReadergetInputSocketReader (unsigned int inputSocketindex)
 
NodeOperationgetInputOperation (unsigned int inputSocketindex)
 
void deinitMutex ()
 
void initMutex ()
 
void lockMutex ()
 
void unlockMutex ()
 
void setComplex (bool complex)
 set whether this operation is complex More...
 
virtual void executePixel (float output[4], int x, int y, void *)
 calculate a single pixel More...
 
virtual void executePixelFiltered (float[4], float, float, float[2], float[2])
 calculate a single pixel using an EWA filter More...
 

Protected Attributes

Maskm_mask
 
int m_maskWidth
 
int m_maskHeight
 
float m_maskWidthInv
 
float m_maskHeightInv
 
float m_mask_px_ofs [2]
 
float m_frame_shutter
 
int m_frame_number
 
bool m_do_feather
 
struct MaskRasterHandlem_rasterMaskHandles [CMP_NODE_MASK_MBLUR_SAMPLES_MAX]
 
unsigned int m_rasterMaskHandleTot
 
- Protected Attributes inherited from blender::compositor::NodeOperation
unsigned int m_width
 
unsigned int m_height
 
NodeOperationFlags flags
 

Detailed Description

Class with implementation of mask rasterization

Definition at line 34 of file COM_MaskOperation.h.

Constructor & Destructor Documentation

◆ MaskOperation()

blender::compositor::MaskOperation::MaskOperation ( )

Member Function Documentation

◆ deinitExecution()

void blender::compositor::MaskOperation::deinitExecution ( )
overridevirtual

◆ determineResolution()

void blender::compositor::MaskOperation::determineResolution ( unsigned int  resolution[2],
unsigned int  preferredResolution[2] 
)
overrideprotectedvirtual

Determine the output resolution. The resolution is retrieved from the Renderer

Reimplemented from blender::compositor::NodeOperation.

Definition at line 112 of file COM_MaskOperation.cc.

References blender::compositor::NodeOperation::determineResolution(), m_maskHeight, and m_maskWidth.

◆ executePixelSampled()

void blender::compositor::MaskOperation::executePixelSampled ( float  [4],
float  ,
float  ,
PixelSampler   
)
overridevirtual

calculate a single pixel

Note
this method is called for non-complex
Parameters
resultis a float[4] array to store the result
xthe x-coordinate of the pixel to calculate in image space
ythe y-coordinate of the pixel to calculate in image space
inputBufferschunks that can be read by their ReadBufferOperation.

Reimplemented from blender::compositor::NodeOperation.

Definition at line 131 of file COM_MaskOperation.cc.

References BKE_maskrasterize_handle_sample(), m_mask_px_ofs, m_maskHeightInv, m_maskWidthInv, m_rasterMaskHandles, m_rasterMaskHandleTot, output, and x.

◆ initExecution()

void blender::compositor::MaskOperation::initExecution ( )
overridevirtual

◆ setFeather()

void blender::compositor::MaskOperation::setFeather ( bool  feather)
inline

◆ setFramenumber()

void blender::compositor::MaskOperation::setFramenumber ( int  frame_number)
inline

◆ setMask()

void blender::compositor::MaskOperation::setMask ( Mask mask)
inline

Definition at line 66 of file COM_MaskOperation.h.

References mask().

Referenced by blender::compositor::MaskNode::convertToOperations().

◆ setMaskHeight()

void blender::compositor::MaskOperation::setMaskHeight ( int  height)
inline

Definition at line 76 of file COM_MaskOperation.h.

References float(), and height.

Referenced by blender::compositor::MaskNode::convertToOperations().

◆ setMaskWidth()

void blender::compositor::MaskOperation::setMaskWidth ( int  width)
inline

Definition at line 70 of file COM_MaskOperation.h.

References float(), and width.

Referenced by blender::compositor::MaskNode::convertToOperations().

◆ setMotionBlurSamples()

void blender::compositor::MaskOperation::setMotionBlurSamples ( int  samples)
inline

◆ setMotionBlurShutter()

void blender::compositor::MaskOperation::setMotionBlurShutter ( float  shutter)
inline

Member Data Documentation

◆ m_do_feather

bool blender::compositor::MaskOperation::m_do_feather
protected

Definition at line 49 of file COM_MaskOperation.h.

Referenced by initExecution().

◆ m_frame_number

int blender::compositor::MaskOperation::m_frame_number
protected

Definition at line 47 of file COM_MaskOperation.h.

Referenced by initExecution(), and MaskOperation().

◆ m_frame_shutter

float blender::compositor::MaskOperation::m_frame_shutter
protected

Definition at line 46 of file COM_MaskOperation.h.

Referenced by initExecution(), and MaskOperation().

◆ m_mask

Mask* blender::compositor::MaskOperation::m_mask
protected

Definition at line 36 of file COM_MaskOperation.h.

Referenced by initExecution(), and MaskOperation().

◆ m_mask_px_ofs

float blender::compositor::MaskOperation::m_mask_px_ofs[2]
protected

Definition at line 44 of file COM_MaskOperation.h.

Referenced by executePixelSampled().

◆ m_maskHeight

int blender::compositor::MaskOperation::m_maskHeight
protected

Definition at line 41 of file COM_MaskOperation.h.

Referenced by determineResolution(), initExecution(), and MaskOperation().

◆ m_maskHeightInv

float blender::compositor::MaskOperation::m_maskHeightInv
protected

Definition at line 43 of file COM_MaskOperation.h.

Referenced by executePixelSampled(), and MaskOperation().

◆ m_maskWidth

int blender::compositor::MaskOperation::m_maskWidth
protected

Definition at line 40 of file COM_MaskOperation.h.

Referenced by determineResolution(), initExecution(), and MaskOperation().

◆ m_maskWidthInv

float blender::compositor::MaskOperation::m_maskWidthInv
protected

Definition at line 42 of file COM_MaskOperation.h.

Referenced by executePixelSampled(), and MaskOperation().

◆ m_rasterMaskHandles

struct MaskRasterHandle* blender::compositor::MaskOperation::m_rasterMaskHandles[CMP_NODE_MASK_MBLUR_SAMPLES_MAX]
protected

◆ m_rasterMaskHandleTot

unsigned int blender::compositor::MaskOperation::m_rasterMaskHandleTot
protected

The documentation for this class was generated from the following files: