Merge pull request #99554 from Calinou/editor-directionallight-3-splits-hide-property-3.x
Some checks failed
🔗 GHA / 📊 Static (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🌐 JavaScript (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / ☁ Server (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled

[3.x] Hide last DirectionalLight shadow split distance property when using PSSM 3 Splits
This commit is contained in:
lawnjelly 2024-11-24 08:08:55 +00:00 committed by GitHub
commit b841dad1ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -365,12 +365,17 @@ bool DirectionalLight::is_blend_splits_enabled() const {
void DirectionalLight::_validate_property(PropertyInfo &property) const {
if (shadow_mode == SHADOW_ORTHOGONAL && (property.name == "directional_shadow_split_1" || property.name == "directional_shadow_blend_splits" || property.name == "directional_shadow_bias_split_scale")) {
// Split 2, split blending and bias split scale are only used with the PSSM 2 Splits and PSSM 4 Splits shadow modes.
// Splits 2/3/4, split blending and bias split scale are only used with the PSSM 2 Splits, PSSM 3 Splits and PSSM 4 Splits shadow modes.
property.usage = PROPERTY_USAGE_NOEDITOR;
}
if ((shadow_mode == SHADOW_ORTHOGONAL || shadow_mode == SHADOW_PARALLEL_2_SPLITS) && (property.name == "directional_shadow_split_2" || property.name == "directional_shadow_split_3")) {
// Splits 3 and 4 are only used with the PSSM 4 Splits shadow mode.
if ((shadow_mode == SHADOW_ORTHOGONAL || shadow_mode == SHADOW_PARALLEL_2_SPLITS) && (property.name == "directional_shadow_split_2")) {
// Splits 3/4 are only used with the PSSM 3 Splits and PSSM 4 Splits shadow modes.
property.usage = PROPERTY_USAGE_NOEDITOR;
}
if ((shadow_mode == SHADOW_ORTHOGONAL || shadow_mode == SHADOW_PARALLEL_2_SPLITS || shadow_mode == SHADOW_PARALLEL_3_SPLITS) && (property.name == "directional_shadow_split_3")) {
// Split 4 is only used with the PSSM 4 Splits shadow mode.
property.usage = PROPERTY_USAGE_NOEDITOR;
}