diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-04-13 16:58:12 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-04-13 16:58:12 +0400 |
commit | 88a261c13b8ac203e2a7ea936cd8b277b8a07c9f (patch) | |
tree | 1648b66a0eff11279a52c07cee7f94d4d742b57d /intern/cycles/blender | |
parent | 11d24cb58f527884bfbb36fdff70c016d50c919c (diff) |
Cycles: add render layer use environment option to disable world lighting on
individual render layers.
Diffstat (limited to 'intern/cycles/blender')
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 2 | ||||
-rw-r--r-- | intern/cycles/blender/blender_shader.cpp | 1 | ||||
-rw-r--r-- | intern/cycles/blender/blender_sync.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/blender/blender_sync.h | 4 |
4 files changed, 8 insertions, 1 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 47aba845ba3..4a8b639b390 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -181,6 +181,8 @@ class CyclesRender_PT_layers(CyclesButtonsPanel, Panel): col.label(text="Material:") col.prop(rl, "material_override", text="") + col.prop(rl, "use_sky", "Use Environment") + col = split.column() col.prop(rl, "layers", text="Layer") col.label(text="Mask Layers:") diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp index 74d41208287..52d97753db3 100644 --- a/intern/cycles/blender/blender_shader.cpp +++ b/intern/cycles/blender/blender_shader.cpp @@ -728,6 +728,7 @@ void BlenderSync::sync_world() PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles"); background->transparent = get_boolean(cscene, "film_transparent"); + background->use = render_layer.use_background; if(background->modified(prevbackground)) background->tag_update(scene); diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp index 066e5b776b8..5a286298774 100644 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@ -207,6 +207,7 @@ void BlenderSync::sync_render_layers(BL::SpaceView3D b_v3d, const char *layer) render_layer.layer = render_layer.scene_layer; render_layer.holdout_layer = 0; render_layer.material_override = PointerRNA_NULL; + render_layer.use_background = true; return; } } @@ -224,6 +225,7 @@ void BlenderSync::sync_render_layers(BL::SpaceView3D b_v3d, const char *layer) render_layer.holdout_layer = get_layer(b_rlay->layers_zmask()); render_layer.layer |= render_layer.holdout_layer; render_layer.material_override = b_rlay->material_override(); + render_layer.use_background = b_rlay->use_sky(); } first_layer = false; diff --git a/intern/cycles/blender/blender_sync.h b/intern/cycles/blender/blender_sync.h index bfb530c9f99..db26f304d84 100644 --- a/intern/cycles/blender/blender_sync.h +++ b/intern/cycles/blender/blender_sync.h @@ -107,7 +107,8 @@ private: struct RenderLayerInfo { RenderLayerInfo() : scene_layer(0), layer(0), holdout_layer(0), - material_override(PointerRNA_NULL) + material_override(PointerRNA_NULL), + use_background(true) {} string name; @@ -115,6 +116,7 @@ private: uint layer; uint holdout_layer; BL::Material material_override; + bool use_background; } render_layer; }; |