Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey@blender.org>2021-05-27 12:07:58 +0300
committerSergey Sharybin <sergey@blender.org>2021-05-27 12:36:30 +0300
commit4ea77429736737bf074d4294276e4cdcfce87ff9 (patch)
tree4712bc63f29e47a10e6fc8c695a918ecfdb094e0 /intern/cycles
parentbf7a67c5c63d02f1736dcb254c493620c5d98d91 (diff)
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.
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/blender/blender_viewport.h6
1 files 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);