diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-24 13:56:05 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-24 16:39:09 +0300 |
commit | a028575c4a613b5d87ec26434f8c846c60861cfe (patch) | |
tree | c3329089d9a357d9dc0ee81d6845e0fccbef3a68 /source/blender/compositor | |
parent | 54e6413d672ffab49f2c8e04382389a9f5b5e706 (diff) |
Compositor: Allow using debug pass output in the compositor
Currently only works correct with single float output, RGBA and vector are not
supported so if one need to use this passes he'll need to wait a bit still.
It is coming, don't worry.
Diffstat (limited to 'source/blender/compositor')
5 files changed, 24 insertions, 0 deletions
diff --git a/source/blender/compositor/CMakeLists.txt b/source/blender/compositor/CMakeLists.txt index 7a8c5596a57..972db6b71d2 100644 --- a/source/blender/compositor/CMakeLists.txt +++ b/source/blender/compositor/CMakeLists.txt @@ -551,4 +551,8 @@ data_to_c(${CMAKE_CURRENT_SOURCE_DIR}/operations/COM_OpenCLKernels.cl add_definitions(-DCL_USE_DEPRECATED_OPENCL_1_1_APIS) +if(WITH_CYCLES AND WITH_CYCLES_DEBUG) + add_definitions(-DWITH_CYCLES_DEBUG) +endif() + blender_add_lib(bf_compositor "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/compositor/SConscript b/source/blender/compositor/SConscript index 370600a594e..b3fe494a25c 100644 --- a/source/blender/compositor/SConscript +++ b/source/blender/compositor/SConscript @@ -59,6 +59,9 @@ incs = [ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): incs.append(env['BF_PTHREADS_INC']) +if env['WITH_BF_CYCLES'] and env['WITH_BF_CYCLES_DEBUG']: + defs.append('WITH_CYCLES_DEBUG') + if False: # gives link errors 'win' in env['OURPLATFORM']: # split into 3 modules to work around command length limit on Windows env.BlenderLib('bf_composite_intern', sources_intern, incs, defines=defs, libtype=['core'], priority=[166]) diff --git a/source/blender/compositor/nodes/COM_RenderLayersNode.cpp b/source/blender/compositor/nodes/COM_RenderLayersNode.cpp index 02bf1ec8cfb..69d2bf86531 100644 --- a/source/blender/compositor/nodes/COM_RenderLayersNode.cpp +++ b/source/blender/compositor/nodes/COM_RenderLayersNode.cpp @@ -86,4 +86,8 @@ void RenderLayersNode::convertToOperations(NodeConverter &converter, const Compo testSocketLink(converter, context, 28, new RenderLayersCyclesOperation(SCE_PASS_SUBSURFACE_DIRECT)); testSocketLink(converter, context, 29, new RenderLayersCyclesOperation(SCE_PASS_SUBSURFACE_INDIRECT)); testSocketLink(converter, context, 30, new RenderLayersCyclesOperation(SCE_PASS_SUBSURFACE_COLOR)); + +#ifdef WITH_CYCLES_DEBUG + testSocketLink(converter, context, 31, new RenderLayersCyclesDebugOperation(SCE_PASS_DEBUG)); +#endif } diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cpp b/source/blender/compositor/operations/COM_RenderLayersProg.cpp index af176a766ff..ad0ce3a6fc7 100644 --- a/source/blender/compositor/operations/COM_RenderLayersProg.cpp +++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp @@ -388,3 +388,11 @@ RenderLayersUVOperation::RenderLayersUVOperation() : RenderLayersBaseProg(SCE_PA { this->addOutputSocket(COM_DT_VECTOR); } + +/* ******** Debug Render Layers Cycles Operation ******** */ + +RenderLayersCyclesDebugOperation::RenderLayersCyclesDebugOperation(int pass) + : RenderLayersBaseProg(pass, 1) +{ + this->addOutputSocket(COM_DT_VALUE); +} diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.h b/source/blender/compositor/operations/COM_RenderLayersProg.h index 2ddbc968c01..8930753d7a3 100644 --- a/source/blender/compositor/operations/COM_RenderLayersProg.h +++ b/source/blender/compositor/operations/COM_RenderLayersProg.h @@ -213,4 +213,9 @@ public: RenderLayersUVOperation(); }; +class RenderLayersCyclesDebugOperation : public RenderLayersBaseProg { +public: + RenderLayersCyclesDebugOperation(int pass); +}; + #endif |