diff options
author | Lukas Stockner <lukas.stockner@freenet.de> | 2018-06-14 23:54:42 +0300 |
---|---|---|
committer | Lukas Stockner <lukas.stockner@freenet.de> | 2018-06-14 23:54:42 +0300 |
commit | 27de412ca8de4edad99a46ebdb8aadd7003e42a6 (patch) | |
tree | 4e2659e3490519021195ba626de74adc4813e825 /intern/cycles/blender/blender_object.cpp | |
parent | 525be2f579c994777328bd7ac206be4769d3e6a4 (diff) | |
parent | 3ee606621cf53a2a4897e534e7e04d3632f419f8 (diff) |
Merge remote-tracking branch 'origin/master' into blender2.8
Diffstat (limited to 'intern/cycles/blender/blender_object.cpp')
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index dbeab2fdf61..e0737d5118a 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -242,7 +242,15 @@ void BlenderSync::sync_background_light(bool use_portal) if(b_world) { PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles"); PointerRNA cworld = RNA_pointer_get(&b_world.ptr, "cycles"); - bool sample_as_light = get_boolean(cworld, "sample_as_light"); + + enum SamplingMethod { + SAMPLING_NONE = 0, + SAMPLING_AUTOMATIC, + SAMPLING_MANUAL, + SAMPLING_NUM + }; + int sampling_method = get_enum(cworld, "sampling_method", SAMPLING_NUM, SAMPLING_AUTOMATIC); + bool sample_as_light = (sampling_method != SAMPLING_NONE); if(sample_as_light || use_portal) { /* test if we need to sync */ @@ -254,7 +262,12 @@ void BlenderSync::sync_background_light(bool use_portal) b_world.ptr.data != world_map) { light->type = LIGHT_BACKGROUND; - light->map_resolution = get_int(cworld, "sample_map_resolution"); + if(sampling_method == SAMPLING_MANUAL) { + light->map_resolution = get_int(cworld, "sample_map_resolution"); + } + else { + light->map_resolution = 0; + } light->shader = scene->default_background; light->use_mis = sample_as_light; light->max_bounces = get_int(cworld, "max_bounces"); |