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
path: root/source
diff options
context:
space:
mode:
authorIRIE Shinsuke <irieshinsuke@yahoo.co.jp>2013-11-26 10:33:31 +0400
committerIRIE Shinsuke <irieshinsuke@yahoo.co.jp>2013-11-26 11:05:25 +0400
commit1239c265cb809c618c0b7481219597b48c02f855 (patch)
tree653a50532004979aa87b2a3dbdf34dba96fe5bb4 /source
parenta03aec3178ecf17c06a684e8ebd495364d74d23f (diff)
Blender Internal: Fix material preview that the bounce lights permanently disappear once volume material is used.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/render/render_preview.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index 2bf8a48edc4..081187ef1d8 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -358,13 +358,14 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
/* turn off bounce lights for volume,
* doesn't make much visual difference and slows it down too */
- if (mat->material_type == MA_TYPE_VOLUME) {
- for (base = sce->base.first; base; base = base->next) {
- if (base->object->type == OB_LAMP) {
- /* if doesn't match 'Lamp.002' --> main key light */
- if (strcmp(base->object->id.name + 2, "Lamp.002") != 0) {
+ for (base = sce->base.first; base; base = base->next) {
+ if (base->object->type == OB_LAMP) {
+ /* if doesn't match 'Lamp.002' --> main key light */
+ if (strcmp(base->object->id.name + 2, "Lamp.002") != 0) {
+ if (mat->material_type == MA_TYPE_VOLUME)
base->object->restrictflag |= OB_RESTRICT_RENDER;
- }
+ else
+ base->object->restrictflag &= ~OB_RESTRICT_RENDER;
}
}
}