Fix related to #31317: viewport render layer rendering now uses render visibility
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Sat, 5 May 2012 10:17:18 +0000 (10:17 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Sat, 5 May 2012 10:17:18 +0000 (10:17 +0000)
rather than viewport visibility, is more useful that way.

intern/cycles/blender/blender_object.cpp
intern/cycles/blender/blender_sync.cpp
intern/cycles/blender/blender_sync.h

index bbf48050222b954437681d830cfbf6567edb626f..16b46aa2e2cf9a221d3076ddb0a580b9a16b8557 100644 (file)
@@ -286,7 +286,7 @@ void BlenderSync::sync_objects(BL::SpaceView3D b_v3d, int motion)
        BL::Scene::objects_iterator b_ob;
 
        for(b_scene.objects.begin(b_ob); b_ob != b_scene.objects.end(); ++b_ob) {
-               bool hide = (b_v3d)? b_ob->hide(): b_ob->hide_render();
+               bool hide = (render_layer.use_viewport_visibility)? b_ob->hide(): b_ob->hide_render();
                uint ob_layer = get_layer(b_ob->layers());
 
                if(!hide && (ob_layer & scene_layer)) {
index 24cf10bc02879f4d855c110c3bf8c09bbc689f61..7eccf52579d18b60ee7afeed96e6dedadf59e46d 100644 (file)
@@ -215,6 +215,7 @@ void BlenderSync::sync_render_layers(BL::SpaceView3D b_v3d, const char *layer)
                        render_layer.holdout_layer = 0;
                        render_layer.material_override = PointerRNA_NULL;
                        render_layer.use_background = true;
+                       render_layer.use_viewport_visibility = true;
                        render_layer.samples = 0;
                        return;
                }
@@ -234,6 +235,7 @@ void BlenderSync::sync_render_layers(BL::SpaceView3D b_v3d, const char *layer)
                        render_layer.layer |= render_layer.holdout_layer;
                        render_layer.material_override = b_rlay->material_override();
                        render_layer.use_background = b_rlay->use_sky();
+                       render_layer.use_viewport_visibility = false;
                        render_layer.samples = b_rlay->samples();
                }
 
index d6a7218f74f793294aa31e1ef9f56aa23539ab9f..904cc1b1831a4403a2cac391ff0aecb3bb687f52 100644 (file)
@@ -113,6 +113,7 @@ private:
                : scene_layer(0), layer(0), holdout_layer(0),
                  material_override(PointerRNA_NULL),
                  use_background(true),
+                 use_viewport_visibility(false),
                  samples(0)
                {}
 
@@ -122,6 +123,7 @@ private:
                uint holdout_layer;
                BL::Material material_override;
                bool use_background;
+               bool use_viewport_visibility;
                int samples;
        } render_layer;
 };