Rename any instance of scene layer or render layer in code with view layer
[blender.git] / intern / cycles / blender / blender_util.h
index 314bcaf23c4051b37cb62249e8e32c8c000819f1..a813a09f38af77cfb087811dd4d30fbdbfa57580 100644 (file)
@@ -46,7 +46,7 @@ void python_thread_state_restore(void **python_thread_state);
 static inline BL::Mesh object_to_mesh(BL::BlendData& data,
                                       BL::Object& object,
                                       BL::Scene& scene,
-                                      BL::SceneLayer scene_layer,
+                                      BL::ViewLayer view_layer,
                                       bool apply_modifiers,
                                       bool render,
                                       bool calc_undeformed,
@@ -65,7 +65,7 @@ static inline BL::Mesh object_to_mesh(BL::BlendData& data,
                subsurf_mod.show_viewport(false);
        }
 
-       BL::Mesh me = data.meshes.new_from_object(scene, scene_layer, object, apply_modifiers, (render)? 2: 1, false, calc_undeformed);
+       BL::Mesh me = data.meshes.new_from_object(scene, view_layer, object, apply_modifiers, (render)? 2: 1, false, calc_undeformed);
 
        if(subdivision_type != Mesh::SUBDIVISION_NONE) {
                BL::Modifier subsurf_mod = object.modifiers[object.modifiers.length()-1];
@@ -307,7 +307,7 @@ static inline uint get_layer(const BL::Array<int, 20>& array)
 static inline uint get_layer(const BL::Array<int, 20>& array,
                              const BL::Array<int, 8>& local_array,
                              bool is_light = false,
-                             uint scene_layers = (1 << 20) - 1)
+                             uint view_layers = (1 << 20) - 1)
 {
        uint layer = 0;
 
@@ -319,7 +319,7 @@ static inline uint get_layer(const BL::Array<int, 20>& array,
                /* Consider light is visible if it was visible without layer
                 * override, which matches behavior of Blender Internal.
                 */
-               if(layer & scene_layers) {
+               if(layer & view_layers) {
                        for(uint i = 0; i < 8; i++)
                                layer |= (1 << (20+i));
                }