Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/compositor/operations/COM_ViewerOperation.h')
-rw-r--r--source/blender/compositor/operations/COM_ViewerOperation.h43
1 files changed, 40 insertions, 3 deletions
diff --git a/source/blender/compositor/operations/COM_ViewerOperation.h b/source/blender/compositor/operations/COM_ViewerOperation.h
index 262efd87dba..2d8fe659822 100644
--- a/source/blender/compositor/operations/COM_ViewerOperation.h
+++ b/source/blender/compositor/operations/COM_ViewerOperation.h
@@ -25,18 +25,55 @@
#include "COM_NodeOperation.h"
#include "DNA_image_types.h"
#include "BLI_rect.h"
-#include "COM_ViewerBaseOperation.h"
+#include "BKE_global.h"
-class ViewerOperation : public ViewerBaseOperation {
+class ViewerOperation : public NodeOperation {
private:
+ float *m_outputBuffer;
+ float *m_depthBuffer;
+ Image *m_image;
+ ImageUser *m_imageUser;
+ void *m_lock;
+ bool m_active;
+ float m_centerX;
+ float m_centerY;
+ OrderOfChunks m_chunkOrder;
+ bool m_doDepthBuffer;
+ ImBuf *m_ibuf;
+ bool m_ignoreAlpha;
+
+ const ColorManagedViewSettings *m_viewSettings;
+ const ColorManagedDisplaySettings *m_displaySettings;
+
SocketReader *m_imageInput;
SocketReader *m_alphaInput;
SocketReader *m_depthInput;
public:
ViewerOperation();
- void executeRegion(rcti *rect, unsigned int tileNumber);
void initExecution();
void deinitExecution();
+ void executeRegion(rcti *rect, unsigned int tileNumber);
+ bool isOutputOperation(bool rendering) const { if (G.background) return false; return isActiveViewerOutput(); }
+ void setImage(Image *image) { this->m_image = image; }
+ void setImageUser(ImageUser *imageUser) { this->m_imageUser = imageUser; }
+ const bool isActiveViewerOutput() const { return this->m_active; }
+ void setActive(bool active) { this->m_active = active; }
+ void setCenterX(float centerX) { this->m_centerX = centerX;}
+ void setCenterY(float centerY) { this->m_centerY = centerY;}
+ void setChunkOrder(OrderOfChunks tileOrder) { this->m_chunkOrder = tileOrder; }
+ float getCenterX() const { return this->m_centerX; }
+ float getCenterY() const { return this->m_centerY; }
+ OrderOfChunks getChunkOrder() const { return this->m_chunkOrder; }
+ const CompositorPriority getRenderPriority() const;
+ bool isViewerOperation() { return true; }
+ void setIgnoreAlpha(bool value) { this->m_ignoreAlpha = value; }
+
+ void setViewSettings(const ColorManagedViewSettings *viewSettings) { this->m_viewSettings = viewSettings; }
+ void setDisplaySettings(const ColorManagedDisplaySettings *displaySettings) { this->m_displaySettings = displaySettings; }
+
+private:
+ void updateImage(rcti *rect);
+ void initImage();
};
#endif