diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-03-18 00:09:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-18 00:09:35 +0100 |
commit | 756178d34285e48be07f24d6acccbb36dbbd042c (patch) | |
tree | c4fada0c0194dfe8c9f8a22bfb875dd8cb8467cf /scene/3d/light_3d.h | |
parent | e195032cbc827ade3d9ce639cd1f06cd16c8b66d (diff) | |
parent | c45d2c242bf568363f0d6528dc142c0cac0eb1c8 (diff) |
Merge pull request #59087 from clayjohn/sky-mode
Replace DirectionalLight3D's `use_in_sky_only` with `sky_mode` enum
Diffstat (limited to 'scene/3d/light_3d.h')
-rw-r--r-- | scene/3d/light_3d.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/scene/3d/light_3d.h b/scene/3d/light_3d.h index ed9e0bdfff..81c25f01c3 100644 --- a/scene/3d/light_3d.h +++ b/scene/3d/light_3d.h @@ -156,10 +156,16 @@ public: SHADOW_PARALLEL_4_SPLITS, }; + enum SkyMode { + SKY_MODE_LIGHT_AND_SKY, + SKY_MODE_LIGHT_ONLY, + SKY_MODE_SKY_ONLY, + }; + private: bool blend_splits; ShadowMode shadow_mode; - bool sky_only = false; + SkyMode sky_mode = SKY_MODE_LIGHT_AND_SKY; protected: static void _bind_methods(); @@ -172,13 +178,14 @@ public: void set_blend_splits(bool p_enable); bool is_blend_splits_enabled() const; - void set_sky_only(bool p_sky_only); - bool is_sky_only() const; + void set_sky_mode(SkyMode p_mode); + SkyMode get_sky_mode() const; DirectionalLight3D(); }; VARIANT_ENUM_CAST(DirectionalLight3D::ShadowMode) +VARIANT_ENUM_CAST(DirectionalLight3D::SkyMode) class OmniLight3D : public Light3D { GDCLASS(OmniLight3D, Light3D); |