diff options
-rw-r--r-- | source/blender/compositor/operations/COM_SetValueOperation.cc | 11 | ||||
-rw-r--r-- | source/blender/compositor/operations/COM_SetValueOperation.h | 4 |
2 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/compositor/operations/COM_SetValueOperation.cc b/source/blender/compositor/operations/COM_SetValueOperation.cc index ef43cf64653..39cf92d325f 100644 --- a/source/blender/compositor/operations/COM_SetValueOperation.cc +++ b/source/blender/compositor/operations/COM_SetValueOperation.cc @@ -24,6 +24,7 @@ SetValueOperation::SetValueOperation() { this->addOutputSocket(DataType::Value); flags.is_set_operation = true; + flags.is_fullframe_operation = true; } void SetValueOperation::executePixelSampled(float output[4], @@ -41,4 +42,14 @@ void SetValueOperation::determineResolution(unsigned int resolution[2], resolution[1] = preferredResolution[1]; } +void SetValueOperation::update_memory_buffer(MemoryBuffer *output, + const rcti &output_area, + Span<MemoryBuffer *> UNUSED(inputs), + ExecutionSystem &UNUSED(exec_system)) +{ + BLI_assert(output->is_a_single_elem()); + float *out_elem = output->get_elem(output_area.xmin, output_area.ymin); + *out_elem = m_value; +} + } // namespace blender::compositor diff --git a/source/blender/compositor/operations/COM_SetValueOperation.h b/source/blender/compositor/operations/COM_SetValueOperation.h index 5383f3b5fd3..cf578e1794f 100644 --- a/source/blender/compositor/operations/COM_SetValueOperation.h +++ b/source/blender/compositor/operations/COM_SetValueOperation.h @@ -51,6 +51,10 @@ class SetValueOperation : public NodeOperation { void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]) override; + void update_memory_buffer(MemoryBuffer *output, + const rcti &output_area, + Span<MemoryBuffer *> inputs, + ExecutionSystem &exec_system) override; }; } // namespace blender::compositor |