Files
test/source/blender/compositor/operations/COM_FlipOperation.h
Omar Emara 70a8a9e4d9 Compositor: make Flip node works in local space
This patch changes the operation space of the Flip node from the global
space to the local space. This means that the Flip node will now flip
the image without changing its location.
2024-01-24 11:08:41 +02:00

38 lines
856 B
C++

/* SPDX-FileCopyrightText: 2011 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
#include "COM_MultiThreadedOperation.h"
namespace blender::compositor {
class FlipOperation : public MultiThreadedOperation {
private:
SocketReader *input_operation_;
bool flip_x_;
bool flip_y_;
public:
FlipOperation();
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override;
void init_execution() override;
void deinit_execution() override;
void setFlipX(bool flipX)
{
flip_x_ = flipX;
}
void setFlipY(bool flipY)
{
flip_y_ = flipY;
}
void update_memory_buffer_partial(MemoryBuffer *output,
const rcti &area,
Span<MemoryBuffer *> inputs) override;
};
} // namespace blender::compositor