Cycles: remove option to disable transparent shadows globally.
[blender-staging.git] / intern / cycles / blender / blender_curves.cpp
index 6fa038e8bf0ecda32cb4343df5581a9c68777806..42b985305ea1f7e530c809473b8514f0087777f3 100644 (file)
@@ -411,7 +411,7 @@ static void ExportCurveTrianglePlanes(Mesh *mesh, ParticleCurveData *CData,
                }
        }
 
-       mesh->resize_mesh(mesh->verts.size(), mesh->triangles.size());
+       mesh->resize_mesh(mesh->verts.size(), mesh->num_triangles());
        mesh->attributes.remove(ATTR_STD_VERTEX_NORMAL);
        mesh->attributes.remove(ATTR_STD_FACE_NORMAL);
        mesh->add_face_normals();
@@ -546,7 +546,7 @@ static void ExportCurveTriangleGeometry(Mesh *mesh,
                }
        }
 
-       mesh->resize_mesh(mesh->verts.size(), mesh->triangles.size());
+       mesh->resize_mesh(mesh->verts.size(), mesh->num_triangles());
        mesh->attributes.remove(ATTR_STD_VERTEX_NORMAL);
        mesh->attributes.remove(ATTR_STD_FACE_NORMAL);
        mesh->add_face_normals();
@@ -776,17 +776,17 @@ static void ExportCurveTriangleVcol(ParticleCurveData *CData,
 
                        for(int curvekey = CData->curve_firstkey[curve]; curvekey < CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1; curvekey++) {
                                for(int section = 0; section < resol; section++) {
-                                       cdata[vertexindex] = color_float_to_byte(color_srgb_to_scene_linear(CData->curve_vcol[curve]));
+                                       cdata[vertexindex] = color_float_to_byte(color_srgb_to_scene_linear_v3(CData->curve_vcol[curve]));
                                        vertexindex++;
-                                       cdata[vertexindex] = color_float_to_byte(color_srgb_to_scene_linear(CData->curve_vcol[curve]));
+                                       cdata[vertexindex] = color_float_to_byte(color_srgb_to_scene_linear_v3(CData->curve_vcol[curve]));
                                        vertexindex++;
-                                       cdata[vertexindex] = color_float_to_byte(color_srgb_to_scene_linear(CData->curve_vcol[curve]));
+                                       cdata[vertexindex] = color_float_to_byte(color_srgb_to_scene_linear_v3(CData->curve_vcol[curve]));
                                        vertexindex++;
-                                       cdata[vertexindex] = color_float_to_byte(color_srgb_to_scene_linear(CData->curve_vcol[curve]));
+                                       cdata[vertexindex] = color_float_to_byte(color_srgb_to_scene_linear_v3(CData->curve_vcol[curve]));
                                        vertexindex++;
-                                       cdata[vertexindex] = color_float_to_byte(color_srgb_to_scene_linear(CData->curve_vcol[curve]));
+                                       cdata[vertexindex] = color_float_to_byte(color_srgb_to_scene_linear_v3(CData->curve_vcol[curve]));
                                        vertexindex++;
-                                       cdata[vertexindex] = color_float_to_byte(color_srgb_to_scene_linear(CData->curve_vcol[curve]));
+                                       cdata[vertexindex] = color_float_to_byte(color_srgb_to_scene_linear_v3(CData->curve_vcol[curve]));
                                        vertexindex++;
                                }
                        }
@@ -1004,7 +1004,7 @@ void BlenderSync::sync_curves(Mesh *mesh,
 
                                        for(size_t curve = 0; curve < CData.curve_vcol.size(); curve++)
                                                if(!(CData.curve_keynum[curve] <= 1 || CData.curve_length[curve] == 0.0f))
-                                                       fdata[i++] = color_srgb_to_scene_linear(CData.curve_vcol[curve]);
+                                                       fdata[i++] = color_srgb_to_scene_linear_v3(CData.curve_vcol[curve]);
                                }
                        }
                }