Merge branch 'master' into blender2.8
[blender.git] / intern / cycles / blender / blender_mesh.cpp
index b4cca5f00f4eb904c93cb58de74f7522e75d289b..f86b75f6643080ef4c2e3c734a64fe9fb719c2b5 100644 (file)
@@ -414,7 +414,7 @@ static void attr_create_uv_map(Scene *scene,
                int i = 0;
 
                for(b_mesh.uv_layers.begin(l); l != b_mesh.uv_layers.end(); ++l, ++i) {
-                       bool active_render = b_mesh.uv_textures[i].active_render();
+                       bool active_render = b_mesh.uv_layers[i].active_render();
                        AttributeStandard std = (active_render)? ATTR_STD_UV: ATTR_STD_NONE;
                        ustring name = ustring(l->name().c_str());
 
@@ -942,6 +942,7 @@ static void sync_mesh_fluid_motion(BL::Object& b_ob, Scene *scene, Mesh *mesh)
 }
 
 Mesh *BlenderSync::sync_mesh(BL::Object& b_ob,
+                             BL::Object& b_ob_instance,
                              bool object_updated,
                              bool hide_tris)
 {
@@ -955,7 +956,7 @@ Mesh *BlenderSync::sync_mesh(BL::Object& b_ob,
 
        /* test if we can instance or if the object is modified */
        BL::ID b_ob_data = b_ob.data();
-       BL::ID key = (BKE_object_is_modified(b_ob))? b_ob: b_ob_data;
+       BL::ID key = (BKE_object_is_modified(b_ob))? b_ob_instance: b_ob_data;
        BL::Material material_override = render_layer.material_override;
 
        /* find shader indices */