Cycles: support for mask layers in render layer, this has the same effect as

assigning holdout shaders to every object in the specified layers.

http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes#Layers
This commit is contained in:
2012-02-28 16:44:45 +00:00
parent aecff24add
commit 0052cbed0d
7 changed files with 55 additions and 56 deletions

View File

@@ -208,8 +208,11 @@ void BlenderSync::sync_object(BL::Object b_parent, int b_index, BL::Object b_ob,
if(object_map.sync(&object, b_ob, b_parent, key))
object_updated = true;
/* holdout? */
bool holdout = (layer_flag & render_layer.holdout_layer) != 0;
/* mesh sync */
object->mesh = sync_mesh(b_ob, object_updated);
object->mesh = sync_mesh(b_ob, holdout, object_updated);
/* object sync */
if(object_updated || (object->mesh && object->mesh->need_update)) {
@@ -238,7 +241,7 @@ void BlenderSync::sync_object(BL::Object b_parent, int b_index, BL::Object b_ob,
void BlenderSync::sync_objects(BL::SpaceView3D b_v3d)
{
/* layer data */
uint scene_layer = render_layers.front().scene_layer;
uint scene_layer = render_layer.scene_layer;
/* prepare for sync */
light_map.pre_sync();