diff options
author | Jeroen Bakker <jbakker> | 2021-03-02 13:08:04 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-03-02 13:20:01 +0300 |
commit | 2d4b638a674522507917b5f34ad8b5463ff42eb4 (patch) | |
tree | 0d0a204691aede18a4863e38de267fbfb940bc7d /source/blender/compositor/operations/COM_MultilayerImageOperation.h | |
parent | 8dec6452f22013ee98246ea6d7631c2201a6de3a (diff) |
Cryptomatte: Read metadata from multilayer OpenEXR.
Currently the compositor reads cryptomatte meta-data from the render
result. When loading a multilayer open exr file the meta-data was ignored.
This patch will also load the cryptomatte meta-data from multilayer open
exr files.
This enabled workflows where the rendering and compositing are done in
separate scenes or for future changes where the cryptomatte node will
use the meta-data for name matching and color picking.
Reviewed By: Sergey Sharybin
Differential Revision: https://developer.blender.org/D10384
Diffstat (limited to 'source/blender/compositor/operations/COM_MultilayerImageOperation.h')
-rw-r--r-- | source/blender/compositor/operations/COM_MultilayerImageOperation.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/compositor/operations/COM_MultilayerImageOperation.h b/source/blender/compositor/operations/COM_MultilayerImageOperation.h index adfcc975ade..f5176b0a4db 100644 --- a/source/blender/compositor/operations/COM_MultilayerImageOperation.h +++ b/source/blender/compositor/operations/COM_MultilayerImageOperation.h @@ -24,34 +24,34 @@ class MultilayerBaseOperation : public BaseImageOperation { private: int m_passId; int m_view; - RenderLayer *m_renderlayer; protected: + RenderLayer *m_renderLayer; + RenderPass *m_renderPass; ImBuf *getImBuf(); public: /** * Constructor */ - MultilayerBaseOperation(int passindex, int view); - void setRenderLayer(RenderLayer *renderlayer) - { - this->m_renderlayer = renderlayer; - } + MultilayerBaseOperation(RenderLayer *render_layer, RenderPass *render_pass, int view); }; class MultilayerColorOperation : public MultilayerBaseOperation { public: - MultilayerColorOperation(int passindex, int view) : MultilayerBaseOperation(passindex, view) + MultilayerColorOperation(RenderLayer *render_layer, RenderPass *render_pass, int view) + : MultilayerBaseOperation(render_layer, render_pass, view) { this->addOutputSocket(COM_DT_COLOR); } void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + std::unique_ptr<MetaData> getMetaData() const override; }; class MultilayerValueOperation : public MultilayerBaseOperation { public: - MultilayerValueOperation(int passindex, int view) : MultilayerBaseOperation(passindex, view) + MultilayerValueOperation(RenderLayer *render_layer, RenderPass *render_pass, int view) + : MultilayerBaseOperation(render_layer, render_pass, view) { this->addOutputSocket(COM_DT_VALUE); } @@ -60,7 +60,8 @@ class MultilayerValueOperation : public MultilayerBaseOperation { class MultilayerVectorOperation : public MultilayerBaseOperation { public: - MultilayerVectorOperation(int passindex, int view) : MultilayerBaseOperation(passindex, view) + MultilayerVectorOperation(RenderLayer *render_layer, RenderPass *render_pass, int view) + : MultilayerBaseOperation(render_layer, render_pass, view) { this->addOutputSocket(COM_DT_VECTOR); } |