diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-25 00:05:11 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-25 00:05:11 +0300 |
commit | 5acce60d376292bc228211075c9fe05b41c84ccd (patch) | |
tree | 96312421a81e20448f22fb5e3640cdaf50a8ec7a /source/blender/compositor/operations/COM_RenderLayersProg.cpp | |
parent | 7c5c7b5ef6c3a77411b9e197152d5754943a034d (diff) |
Compositor: Fixes for the debug pass
This commit fixes issues with wrong socket type being added to the Cycles debug
pass compositor operation, which lead to crashes with non-value pass types.
This commit also reverts socket renaming thing because while it's was behaving
ok on runtime file reload might have loose the links which is annoying.
Diffstat (limited to 'source/blender/compositor/operations/COM_RenderLayersProg.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_RenderLayersProg.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cpp b/source/blender/compositor/operations/COM_RenderLayersProg.cpp index d93d327d07d..999565dc40f 100644 --- a/source/blender/compositor/operations/COM_RenderLayersProg.cpp +++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp @@ -393,16 +393,24 @@ RenderLayersUVOperation::RenderLayersUVOperation() : RenderLayersBaseProg(SCE_PA #ifdef WITH_CYCLES_DEBUG -RenderLayersCyclesDebugOperation::RenderLayersCyclesDebugOperation(int pass) - : RenderLayersBaseProg(pass, 1) +RenderLayersCyclesDebugOperation::RenderLayersCyclesDebugOperation( + int pass, + int debug_pass_type) + : RenderLayersBaseProg(pass, RE_debug_pass_num_channels_get(debug_pass_type)) { - this->addOutputSocket(COM_DT_VALUE); -} - -void RenderLayersCyclesDebugOperation::setScene(Scene *scene) -{ - RenderLayersBaseProg::setScene(scene); - this->m_elementsize = RE_debug_pass_num_channels_get(m_scene->r.debug_pass_type); + switch(m_elementsize) { + case 1: + this->addOutputSocket(COM_DT_VALUE); + break; + case 3: + this->addOutputSocket(COM_DT_VECTOR); + break; + case 4: + this->addOutputSocket(COM_DT_COLOR); + break; + default: + BLI_assert(!"Unkown debug pass type element size."); + } } #endif |