diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-06-25 16:14:30 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-06-25 16:39:10 +0300 |
commit | 79c2581bfaf0612f44c44cd09533fc8d231a2d49 (patch) | |
tree | 4f1244d6016e8b6933236a1682ac8ad42aa65955 /source | |
parent | 2b9ac1de491142508212471fb8e1d2cbdd655914 (diff) |
Fix T78238: issue loading existing .blend files with Optix viewport denoiser
Also add additional validation to ensure the denoiser is supported before
trying to use it.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenloader/intern/versioning_cycles.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/versioning_cycles.c b/source/blender/blenloader/intern/versioning_cycles.c index 72ee4c5ec4d..46faddf6e5a 100644 --- a/source/blender/blenloader/intern/versioning_cycles.c +++ b/source/blender/blenloader/intern/versioning_cycles.c @@ -1568,6 +1568,7 @@ void do_versions_after_linking_cycles(Main *bmain) } if (cscene) { + const int DENOISER_AUTO = 0; const int DENOISER_NLM = 1; const int DENOISER_OPTIX = 2; @@ -1578,7 +1579,7 @@ void do_versions_after_linking_cycles(Main *bmain) /* Migrate Optix denoiser to new settings. */ if (cycles_property_int(cscene, "preview_denoising", 0)) { cycles_property_boolean_set(cscene, "use_preview_denoising", true); - cycles_property_boolean_set(cscene, "preview_denoiser", DENOISER_OPTIX); + cycles_property_int_set(cscene, "preview_denoiser", DENOISER_AUTO); } } |