|
Blender
V2.93
|
#include <COM_RenderLayersProg.h>
Inherits blender::compositor::NodeOperation.
Inherited by blender::compositor::RenderLayersAOOperation, blender::compositor::RenderLayersAlphaProg, and blender::compositor::RenderLayersDepthProg.
Public Member Functions | |
| RenderLayersProg (const char *passName, DataType type, int elementsize) | |
| void | setScene (Scene *scene) |
| Scene * | getScene () const |
| void | setRenderData (const RenderData *rd) |
| void | setLayerId (short layerId) |
| short | getLayerId () const |
| void | setViewName (const char *viewName) |
| const char * | getViewName () |
| void | initExecution () override |
| void | deinitExecution () override |
| void | executePixelSampled (float output[4], float x, float y, PixelSampler sampler) override |
| calculate a single pixel More... | |
| std::unique_ptr< MetaData > | getMetaData () override |
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 |
| NodeOperationOutput * | getOutputSocket (unsigned int index=0) |
| NodeOperationInput * | getInputSocket (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 MemoryBuffer * | getInputMemoryBuffer (MemoryBuffer **) |
Protected Member Functions | |
| void | determineResolution (unsigned int resolution[2], unsigned int preferredResolution[2]) override |
| float * | getInputBuffer () |
| void | doInterpolation (float output[4], float x, float y, PixelSampler sampler) |
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) |
| SocketReader * | getInputSocketReader (unsigned int inputSocketindex) |
| NodeOperation * | getInputOperation (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 | |
| Scene * | m_scene |
| short | m_layerId |
| const char * | m_viewName |
| float * | m_inputBuffer |
| std::string | m_passName |
| int | m_elementsize |
| const RenderData * | m_rd |
| render data used for active rendering More... | |
Protected Attributes inherited from blender::compositor::NodeOperation | |
| unsigned int | m_width |
| unsigned int | m_height |
| NodeOperationFlags | flags |
Base class for all renderlayeroperations
Definition at line 36 of file COM_RenderLayersProg.h.
| blender::compositor::RenderLayersProg::RenderLayersProg | ( | const char * | passName, |
| DataType | type, | ||
| int | elementsize | ||
| ) |
Constructor
Definition at line 39 of file COM_RenderLayersProg.cc.
References blender::compositor::NodeOperation::addOutputSocket(), m_elementsize, m_inputBuffer, m_rd, and setScene().
|
overridevirtual |
Reimplemented from blender::compositor::NodeOperation.
Definition at line 186 of file COM_RenderLayersProg.cc.
References m_inputBuffer.
|
overrideprotectedvirtual |
Determine the output resolution. The resolution is retrieved from the Renderer
Reimplemented from blender::compositor::NodeOperation.
Definition at line 191 of file COM_RenderLayersProg.cc.
References BLI_findlink(), getLayerId(), getScene(), ViewLayer::name, RE_AcquireResultRead(), RE_GetRenderLayer(), RE_GetSceneRender(), RE_ReleaseResult(), RenderLayer::rectx, RenderLayer::recty, and Scene::view_layers.
|
protected |
Definition at line 77 of file COM_RenderLayersProg.cc.
References blender::compositor::Bicubic, blender::compositor::Bilinear, BLI_bicubic_interpolation_fl(), BLI_bilinear_interpolation_fl(), copy_v3_v3(), copy_v4_v4(), blender::compositor::NodeOperation::getHeight(), blender::compositor::NodeOperation::getWidth(), height, m_elementsize, m_inputBuffer, blender::compositor::Nearest, output, width, x, y, zero_v3(), and zero_v4().
Referenced by executePixelSampled(), blender::compositor::RenderLayersAOOperation::executePixelSampled(), and blender::compositor::RenderLayersAlphaProg::executePixelSampled().
|
overridevirtual |
calculate a single pixel
| result | is a float[4] array to store the result |
| x | the x-coordinate of the pixel to calculate in image space |
| y | the y-coordinate of the pixel to calculate in image space |
| inputBuffers | chunks that can be read by their ReadBufferOperation. |
Reimplemented from blender::compositor::NodeOperation.
Reimplemented in blender::compositor::RenderLayersDepthProg, blender::compositor::RenderLayersAlphaProg, and blender::compositor::RenderLayersAOOperation.
Definition at line 124 of file COM_RenderLayersProg.cc.
References BLI_assert, RenderData::border, blender::compositor::Color, doInterpolation(), blender::compositor::NodeOperationOutput::getDataType(), blender::compositor::NodeOperation::getHeight(), blender::compositor::NodeOperation::getOutputSocket(), blender::compositor::NodeOperation::getWidth(), m_elementsize, m_inputBuffer, m_rd, RenderData::mode, output, R_BORDER, R_CROP, RenderData::size, blender::compositor::Value, blender::compositor::Vector, x, rctf::xmin, RenderData::xsch, y, rctf::ymin, RenderData::ysch, zero_v3(), and zero_v4().
|
inlineprotected |
retrieve the reference to the float buffer of the renderer.
Definition at line 79 of file COM_RenderLayersProg.h.
References m_inputBuffer.
Referenced by blender::compositor::RenderLayersAOOperation::executePixelSampled(), blender::compositor::RenderLayersAlphaProg::executePixelSampled(), and blender::compositor::RenderLayersDepthProg::executePixelSampled().
|
inline |
Definition at line 112 of file COM_RenderLayersProg.h.
References m_layerId.
Referenced by determineResolution(), getMetaData(), and initExecution().
|
overridevirtual |
Return the meta data associated with this branch.
The return parameter holds an instance or is an nullptr.
Reimplemented from blender::compositor::NodeOperation.
Definition at line 221 of file COM_RenderLayersProg.cc.
References blender::bke::cryptomatte::BKE_cryptomatte_extract_layer_name(), BKE_stamp_info_callback(), BLI_findlink(), BLI_strnlen(), blender::compositor::MetaDataExtractCallbackData::extract_cryptomatte_meta_data(), getLayerId(), getScene(), m_passName, blender::compositor::MetaDataExtractCallbackData::meta_data, ViewLayer::name, RE_AcquireResultRead(), RE_GetSceneRender(), RE_ReleaseResult(), scene, blender::compositor::MetaDataExtractCallbackData::setCryptomatteKeys(), RenderResult::stamp_data, and Scene::view_layers.
|
inline |
Definition at line 100 of file COM_RenderLayersProg.h.
References m_scene.
Referenced by determineResolution(), getMetaData(), and initExecution().
|
inline |
Definition at line 120 of file COM_RenderLayersProg.h.
References m_viewName.
|
overridevirtual |
Reimplemented from blender::compositor::NodeOperation.
Definition at line 50 of file COM_RenderLayersProg.cc.
References BLI_findlink(), getLayerId(), getScene(), m_inputBuffer, m_passName, ViewLayer::name, RE_AcquireResultRead(), RE_GetRenderLayer(), RE_GetSceneRender(), RE_ReleaseResult(), RE_RenderLayerGetPass(), scene, and Scene::view_layers.
|
inline |
Definition at line 108 of file COM_RenderLayersProg.h.
|
inline |
Definition at line 104 of file COM_RenderLayersProg.h.
|
inline |
setter for the scene field. Will be called from
Definition at line 96 of file COM_RenderLayersProg.h.
References scene.
Referenced by RenderLayersProg().
|
inline |
Definition at line 116 of file COM_RenderLayersProg.h.
|
protected |
Definition at line 63 of file COM_RenderLayersProg.h.
Referenced by doInterpolation(), executePixelSampled(), and RenderLayersProg().
|
protected |
cached instance to the float buffer inside the layer
Definition at line 56 of file COM_RenderLayersProg.h.
Referenced by deinitExecution(), doInterpolation(), executePixelSampled(), getInputBuffer(), initExecution(), and RenderLayersProg().
|
protected |
layerId of the layer where this operation needs to get its data from
Definition at line 46 of file COM_RenderLayersProg.h.
Referenced by getLayerId().
|
protected |
Render-pass where this operation needs to get its data from.
Definition at line 61 of file COM_RenderLayersProg.h.
Referenced by getMetaData(), and initExecution().
|
protected |
render data used for active rendering
Definition at line 68 of file COM_RenderLayersProg.h.
Referenced by executePixelSampled(), and RenderLayersProg().
|
protected |
Reference to the scene object.
Definition at line 41 of file COM_RenderLayersProg.h.
Referenced by getScene().
|
protected |
viewName of the view to use (unless another view is specified by the node
Definition at line 51 of file COM_RenderLayersProg.h.
Referenced by getViewName().