From 4ea77429736737bf074d4294276e4cdcfce87ff9 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 27 May 2021 11:07:58 +0200 Subject: [PATCH] Refactor: Remove friend class from Cycles viewport parameters Such pattern should only be used when it is really needed. Otherwise just stick to a more regular design, without worrying who is the user of the class. Otherwise it will be annoying to subclass or unit test. --- intern/cycles/blender/blender_viewport.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/intern/cycles/blender/blender_viewport.h b/intern/cycles/blender/blender_viewport.h index 5939076979a..08ef6a9e679 100644 --- a/intern/cycles/blender/blender_viewport.h +++ b/intern/cycles/blender/blender_viewport.h @@ -28,7 +28,7 @@ CCL_NAMESPACE_BEGIN class BlenderViewportParameters { - private: + public: bool use_scene_world; bool use_scene_lights; float studiolight_rotate_z; @@ -37,13 +37,11 @@ class BlenderViewportParameters { ustring studiolight_path; BlenderViewportParameters(); - BlenderViewportParameters(BL::SpaceView3D &b_v3d); + explicit BlenderViewportParameters(BL::SpaceView3D &b_v3d); const bool modified(const BlenderViewportParameters &other) const; const bool custom_viewport_parameters() const; - friend class BlenderSync; - public: /* Retrieve the render pass type that needs to be displayed on the given `SpaceView3D` * When the `b_v3d` parameter is not given `PASS_NONE` will be returned. */ static PassType get_render_pass(BL::SpaceView3D &b_v3d);