|
Blender
V2.93
|
#include <COM_PreviewOperation.h>
Inherits blender::compositor::NodeOperation.
Public Member Functions | |
| PreviewOperation (const ColorManagedViewSettings *viewSettings, const ColorManagedDisplaySettings *displaySettings, unsigned int defaultWidth, unsigned int defaultHeight) | |
| void | verifyPreview (bNodeInstanceHash *previews, bNodeInstanceKey key) |
| bool | isOutputOperation (bool) const override |
| isOutputOperation determines whether this operation is an output of the ExecutionSystem during rendering or editing. More... | |
| void | initExecution () override |
| void | deinitExecution () override |
| eCompositorPriority | getRenderPriority () const override |
| get the render priority of this node. More... | |
| void | executeRegion (rcti *rect, unsigned int tileNumber) override |
| when a chunk is executed by a CPUDevice, this method is called More... | |
| void | determineResolution (unsigned int resolution[2], unsigned int preferredResolution[2]) override |
| determine the resolution of this node More... | |
| bool | determineDependingAreaOfInterest (rcti *input, ReadBufferOperation *readOperation, rcti *output) 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) |
| void | setbNodeTree (const bNodeTree *tree) |
| 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... | |
| void | setResolutionInputSocketIndex (unsigned int index) |
| set the index of the input socket that will determine the resolution of this operation 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 **) |
| virtual std::unique_ptr< MetaData > | getMetaData () |
Protected Attributes | |
| unsigned char * | m_outputBuffer |
| bNodePreview * | m_preview |
| holds reference to the SDNA bNode, where this nodes will render the preview image for More... | |
| SocketReader * | m_input |
| float | m_divider |
| unsigned int | m_defaultWidth |
| unsigned int | m_defaultHeight |
| const ColorManagedViewSettings * | m_viewSettings |
| const ColorManagedDisplaySettings * | m_displaySettings |
Protected Attributes inherited from blender::compositor::NodeOperation | |
| unsigned int | m_width |
| unsigned int | m_height |
| NodeOperationFlags | flags |
Additional Inherited Members | |
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 | executePixelSampled (float[4], float, float, PixelSampler) |
| calculate a single pixel 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... | |
Definition at line 29 of file COM_PreviewOperation.h.
| blender::compositor::PreviewOperation::PreviewOperation | ( | const ColorManagedViewSettings * | viewSettings, |
| const ColorManagedDisplaySettings * | displaySettings, | ||
| unsigned int | defaultWidth, | ||
| unsigned int | defaultHeight | ||
| ) |
Definition at line 38 of file COM_PreviewOperation.cc.
References blender::compositor::NodeOperation::addInputSocket(), blender::compositor::Color, blender::compositor::NodeOperation::flags, blender::compositor::NodeOperationFlags::is_preview_operation, m_defaultHeight, m_defaultWidth, m_displaySettings, m_divider, m_input, m_outputBuffer, m_preview, m_viewSettings, blender::compositor::None, and blender::compositor::NodeOperationFlags::use_viewer_border.
|
overridevirtual |
Reimplemented from blender::compositor::NodeOperation.
Definition at line 86 of file COM_PreviewOperation.cc.
References m_input, and m_outputBuffer.
|
overridevirtual |
Reimplemented from blender::compositor::NodeOperation.
Definition at line 120 of file COM_PreviewOperation.cc.
References blender::compositor::NodeOperation::determineDependingAreaOfInterest(), m_divider, output, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
|
overridevirtual |
determine the resolution of this node
| resolution | the result of this operation |
| preferredResolution | the preferable resolution as no resolution could be determined |
Reimplemented from blender::compositor::NodeOperation.
Definition at line 133 of file COM_PreviewOperation.cc.
References BLI_assert, blender::compositor::COM_PREVIEW_SIZE, blender::compositor::NodeOperation::determineResolution(), float(), height, m_defaultHeight, m_defaultWidth, m_divider, and width.
|
overridevirtual |
when a chunk is executed by a CPUDevice, this method is called
| rect | the rectangle of the chunk (location and size) |
| chunkNumber | the chunkNumber to be calculated |
| memoryBuffers | all input MemoryBuffer's needed |
Reimplemented from blender::compositor::NodeOperation.
Definition at line 92 of file COM_PreviewOperation.cc.
References floor(), blender::compositor::NodeOperation::getWidth(), IMB_colormanagement_display_processor_new(), IMB_colormanagement_processor_apply_v4(), IMB_colormanagement_processor_free(), m_displaySettings, m_divider, m_input, m_outputBuffer, m_viewSettings, blender::compositor::Nearest, blender::compositor::NodeOperation::readSampled(), rgba_float_to_uchar(), x, rcti::xmin, y, and rcti::ymin.
|
overridevirtual |
get the render priority of this node.
Reimplemented from blender::compositor::NodeOperation.
Definition at line 169 of file COM_PreviewOperation.cc.
References blender::compositor::Low.
|
overridevirtual |
Reimplemented from blender::compositor::NodeOperation.
Definition at line 65 of file COM_PreviewOperation.cc.
References blender::compositor::NodeOperation::getHeight(), blender::compositor::NodeOperation::getInputSocketReader(), blender::compositor::NodeOperation::getWidth(), m_input, m_outputBuffer, m_preview, MEM_callocN, MEM_freeN, bNodePreview::rect, bNodePreview::xsize, and bNodePreview::ysize.
|
inlineoverridevirtual |
isOutputOperation determines whether this operation is an output of the ExecutionSystem during rendering or editing.
Default behavior if not overridden, this operation will not be evaluated as being an output of the ExecutionSystem.
| rendering | [true false] true: rendering false: editing |
Reimplemented from blender::compositor::NodeOperation.
Definition at line 52 of file COM_PreviewOperation.h.
References G.
| void blender::compositor::PreviewOperation::verifyPreview | ( | bNodeInstanceHash * | previews, |
| bNodeInstanceKey | key | ||
| ) |
Definition at line 57 of file COM_PreviewOperation.cc.
References BKE_node_preview_verify(), and m_preview.
|
protected |
Definition at line 40 of file COM_PreviewOperation.h.
Referenced by determineResolution(), and PreviewOperation().
|
protected |
Definition at line 39 of file COM_PreviewOperation.h.
Referenced by determineResolution(), and PreviewOperation().
|
protected |
Definition at line 43 of file COM_PreviewOperation.h.
Referenced by executeRegion(), and PreviewOperation().
|
protected |
Definition at line 38 of file COM_PreviewOperation.h.
Referenced by determineDependingAreaOfInterest(), determineResolution(), executeRegion(), and PreviewOperation().
|
protected |
Definition at line 37 of file COM_PreviewOperation.h.
Referenced by deinitExecution(), executeRegion(), initExecution(), and PreviewOperation().
|
protected |
Definition at line 31 of file COM_PreviewOperation.h.
Referenced by deinitExecution(), executeRegion(), initExecution(), and PreviewOperation().
|
protected |
holds reference to the SDNA bNode, where this nodes will render the preview image for
Definition at line 36 of file COM_PreviewOperation.h.
Referenced by initExecution(), PreviewOperation(), and verifyPreview().
|
protected |
Definition at line 42 of file COM_PreviewOperation.h.
Referenced by executeRegion(), and PreviewOperation().