diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-07-11 19:33:35 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-07-11 19:33:35 +0300 |
commit | 78988e175ae4904c043a6ca8499887b69c024c4f (patch) | |
tree | dee811dc61392c4b85eb2fd7697296a0204f5ee1 /source/blender | |
parent | 5db8f6d18947a6d8534b8e5768ba779109a645ee (diff) |
Fix T55915 DOF Number of blades wrong logic
Thanks @kostex for the fix.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 68b1f5a74aa..0c734a8e7c7 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -1982,12 +1982,15 @@ static void rna_GPUDOFSettings_blades_set(PointerRNA *ptr, const int value) { GPUDOFSettings *dofsettings = (GPUDOFSettings *)ptr->data; - if (value < 3 && dofsettings->num_blades > 2) - dofsettings->num_blades = 0; - else if (value > 0 && dofsettings->num_blades == 0) - dofsettings->num_blades = 3; - else + if (value == 1 || value == 2) { + if (dofsettings->num_blades == 0) { + dofsettings->num_blades = 3; + } else { + dofsettings->num_blades = 0; + } + } else { dofsettings->num_blades = value; + } } static void rna_GPUDOFSettings_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr)) |