From 68d1f091583168dce4e52d3c7378b9b0359e903a Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Tue, 27 Aug 2019 15:47:30 +0200 Subject: Shading Modes: Material and Render Preview This change implements the basics as described in {T68312} for the shading modes. * LookDev shading mode is renamed to Material Preview. It always uses Eevee as renderer, and is intended to provide a fast material preview suitable for texture painting, and texture and material setup. * Rendered shading gains "Use Scene Lights" and "Use Scene World" options similar to current Material Preview. These will be enabled by default. When Use Scene World is turned off, HDRIs will be used for lighting instead. These options are available for EEVEE and Cycles. * Renderers will be able to customize the shading settings panel and add additional settings. Reviewed By: brecht, fclem Differential Revision: https://developer.blender.org/D5612 --- intern/cycles/blender/blender_sync.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'intern/cycles/blender/blender_sync.h') diff --git a/intern/cycles/blender/blender_sync.h b/intern/cycles/blender/blender_sync.h index 00afceebde3..c6c7b7549cf 100644 --- a/intern/cycles/blender/blender_sync.h +++ b/intern/cycles/blender/blender_sync.h @@ -23,6 +23,7 @@ #include "RNA_blender_cpp.h" #include "blender/blender_util.h" +#include "blender/blender_viewport.h" #include "render/scene.h" #include "render/session.h" @@ -36,6 +37,7 @@ CCL_NAMESPACE_BEGIN class Background; class BlenderObjectCulling; +class BlenderViewportParameters; class Camera; class Film; class Light; @@ -59,7 +61,7 @@ class BlenderSync { ~BlenderSync(); /* sync */ - void sync_recalc(BL::Depsgraph &b_depsgraph); + void sync_recalc(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d); void sync_data(BL::RenderSettings &b_render, BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d, @@ -106,17 +108,18 @@ class BlenderSync { /* sync */ void sync_lights(BL::Depsgraph &b_depsgraph, bool update_all); void sync_materials(BL::Depsgraph &b_depsgraph, bool update_all); - void sync_objects(BL::Depsgraph &b_depsgraph, float motion_time = 0.0f); + void sync_objects(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d, float motion_time = 0.0f); void sync_motion(BL::RenderSettings &b_render, BL::Depsgraph &b_depsgraph, + BL::SpaceView3D &b_v3d, BL::Object &b_override, int width, int height, void **python_thread_state); void sync_film(); void sync_view(); - void sync_world(BL::Depsgraph &b_depsgraph, bool update_all); - void sync_shaders(BL::Depsgraph &b_depsgraph); + void sync_world(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d, bool update_all); + void sync_shaders(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d); void sync_curve_settings(); void sync_nodes(Shader *shader, BL::ShaderNodeTree &b_ntree); @@ -134,6 +137,7 @@ class BlenderSync { float motion_time, bool show_self, bool show_particles, + bool show_lights, BlenderObjectCulling &culling, bool *use_portal); void sync_light(BL::Object &b_parent, @@ -143,7 +147,7 @@ class BlenderSync { int random_id, Transform &tfm, bool *use_portal); - void sync_background_light(bool use_portal); + void sync_background_light(BL::SpaceView3D &b_v3d, bool use_portal); void sync_mesh_motion(BL::Depsgraph &b_depsgraph, BL::Object &b_ob, Object *object, @@ -183,6 +187,7 @@ class BlenderSync { set motion_times; void *world_map; bool world_recalc; + BlenderViewportParameters viewport_parameters; Scene *scene; bool preview; -- cgit v1.2.3