Cycles: Only report exporting curves if there are particle systems on the object

This commit is contained in:
Sergey Sharybin 2014-11-28 16:13:00 +05:00
parent af18fb8036
commit f386f574b1
1 changed files with 6 additions and 3 deletions

View File

@ -556,7 +556,6 @@ void ExportCurveTriangleGeometry(Mesh *mesh, ParticleCurveData *CData, int resol
void ExportCurveSegments(Scene *scene, Mesh *mesh, ParticleCurveData *CData)
{
VLOG(1) << "Exporting curve segments for mesh " << mesh->name;
int num_keys = 0;
int num_curves = 0;
@ -579,6 +578,10 @@ void ExportCurveSegments(Scene *scene, Mesh *mesh, ParticleCurveData *CData)
}
}
if (num_curves > 0) {
VLOG(1) << "Exporting curve segments for mesh " << mesh->name;
}
mesh->curve_keys.reserve(mesh->curve_keys.size() + num_keys);
mesh->curves.reserve(mesh->curves.size() + num_curves);
@ -614,9 +617,9 @@ void ExportCurveSegments(Scene *scene, Mesh *mesh, ParticleCurveData *CData)
}
}
/* check allocation*/
/* check allocation */
if((mesh->curve_keys.size() != num_keys) || (mesh->curves.size() != num_curves)) {
/* allocation failed -> clear data */
VLOG(1) << "Allocation failed, clearing data";
mesh->curve_keys.clear();
mesh->curves.clear();
mesh->curve_attributes.clear();