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:
authorSv. Lockal <lockalsash@gmail.com>2013-08-05 23:16:52 +0400
committerSv. Lockal <lockalsash@gmail.com>2013-08-05 23:16:52 +0400
commitb438c2840cbf533830ecb29b1ef65325d3f77f73 (patch)
tree619cf52e827b0b2db0b8c5db605eaa96d0574e71 /source/blender/compositor/operations/COM_ViewerOperation.h
parentf4e4e2594ce945b8ff900d4713cf7adcfa2d41d2 (diff)
SplitViewer node:
- fix thumbnail preview (previously it showed only one input) - make SplitViewer node update even if the second input is not connected - now it works when the first socket is connected to a zero-sized node tree (e. g. Color Input node) - SplitViewer node is now based on 2 operations: SplitOperation and ViewerOperation. - ViewerBaseOperation was removed as a redundant one. Any future viewer style node can use the same principle and prepare the output before passing to an actual ViewerOperation. Thanks Lukas Toenne for reviewing this patch and giving me get few pieces of advice.
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