Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/blender/blender_object.cpp')
-rw-r--r--intern/cycles/blender/blender_object.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp
index 6b46402730e..991b834dcfa 100644
--- a/intern/cycles/blender/blender_object.cpp
+++ b/intern/cycles/blender/blender_object.cpp
@@ -163,11 +163,16 @@ void BlenderSync::sync_light(BL::Object& b_parent,
light->shader = used_shaders[0];
/* shadow */
+ PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
PointerRNA clamp = RNA_pointer_get(&b_lamp.ptr, "cycles");
light->cast_shadow = get_boolean(clamp, "cast_shadow");
light->use_mis = get_boolean(clamp, "use_multiple_importance_sampling");
- light->samples = get_int(clamp, "samples");
+ int samples = get_int(clamp, "samples");
+ if(get_boolean(cscene, "use_square_samples"))
+ light->samples = samples * samples;
+ else
+ light->samples = samples;
light->max_bounces = get_int(clamp, "max_bounces");
@@ -195,6 +200,7 @@ void BlenderSync::sync_background_light(bool use_portal)
BL::World b_world = b_scene.world();
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");
@@ -213,7 +219,11 @@ void BlenderSync::sync_background_light(bool use_portal)
light->use_mis = sample_as_light;
light->max_bounces = get_int(cworld, "max_bounces");
- light->samples = get_int(cworld, "samples");
+ int samples = get_int(cworld, "samples");
+ if(get_boolean(cscene, "use_square_samples"))
+ light->samples = samples * samples;
+ else
+ light->samples = samples;
light->tag_update(scene);
light_map.set_recalc(b_world);