From 7e61e597253f3ca75f2fb86a57212ca750ffbbe8 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Thu, 5 Sep 2019 12:47:20 +0200 Subject: Cycles: Display RenderPass in Viewport This change allows the user to select a renderpass in the 3d viewport. Added support for external renderers to extend the `View3DShading` struct. This way Blender doesn't need to know the features an external render engine wants to support. Note that the View3DShading is also available in the scene->display.shading; although this is supported, it does not make sense for render engines to put something here as it is really scene/workbench related. Currently cycles assumes that it always needs to calculate the combined pass; it ignores the `pass_flag` in KernelFilm. We could optimize this but that was not in scope of this change Reviewed By: brecht Differential Revision: https://developer.blender.org/D5689 --- source/blender/editors/space_view3d/space_view3d.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/editors/space_view3d/space_view3d.c') diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 5974100b534..a8f662991b6 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -39,6 +39,7 @@ #include "BKE_context.h" #include "BKE_curve.h" #include "BKE_icons.h" +#include "BKE_idprop.h" #include "BKE_lattice.h" #include "BKE_main.h" #include "BKE_mball.h" @@ -363,6 +364,11 @@ static void view3d_free(SpaceLink *sl) if (vd->fx_settings.dof) { MEM_freeN(vd->fx_settings.dof); } + + if (vd->shading.prop) { + IDP_FreeProperty(vd->shading.prop); + vd->shading.prop = NULL; + } } /* spacetype; init callback */ -- cgit v1.2.3