Cycles: Only report exporting curves if there are particle systems on the object
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 28 Nov 2014 11:13:00 +0000 (16:13 +0500)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 28 Nov 2014 11:16:50 +0000 (16:16 +0500)
intern/cycles/blender/blender_curves.cpp

index f010a247df4aadbf095fcf5b4058300e443d15af..7c8e7d401195f0270e8b462bf1804a1f1e1089c5 100644 (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();