Commit: f95d73fb5221f10a650aa03491cec276f4afaf6f
Author: Campbell Barton
Date:   Tue Mar 31 09:24:30 2015 +1100
Branches: temp-modifier-deltamush-experimental
https://developer.blender.org/rBf95d73fb5221f10a650aa03491cec276f4afaf6f

Comment tweaks

===================================================================

M       source/blender/modifiers/intern/MOD_correctivesmooth.c

===================================================================

diff --git a/source/blender/modifiers/intern/MOD_correctivesmooth.c 
b/source/blender/modifiers/intern/MOD_correctivesmooth.c
index eaef99f..248cd92 100644
--- a/source/blender/modifiers/intern/MOD_correctivesmooth.c
+++ b/source/blender/modifiers/intern/MOD_correctivesmooth.c
@@ -28,7 +28,7 @@
 /** \file blender/modifiers/intern/MOD_correctivesmooth.c
  *  \ingroup modifiers
  *
- * Method of smoothing deformation
+ * Method of smoothing deformation, also known as 'delta-mush'.
  */
 
 #include "DNA_scene_types.h"
@@ -90,6 +90,9 @@ static void copyData(ModifierData *md, ModifierData *target)
        if (csmd->bind_coords) {
                tcsmd->bind_coords = MEM_dupallocN(csmd->bind_coords);
        }
+
+       tcsmd->delta_cache = NULL;
+       tcsmd->delta_cache_num = 0;
 }
 
 
@@ -177,9 +180,10 @@ static void dm_get_boundaries(DerivedMesh *dm, float 
*smooth_weights)
 
 
 /* -------------------------------------------------------------------- */
-/* Edge-Length Weighted Smoothing
+/* Simple Weighted Smoothing
+ *
+ * (average of surrounding verts)
  */
-
 static void smooth_iter__simple(
         CorrectiveSmoothModifierData *csmd, DerivedMesh *dm,
         float (*vertexCos)[3], unsigned int numVerts,
@@ -241,13 +245,11 @@ static void smooth_iter__simple(
                        }
                }
                else {
-
                        for (i = 0; i < numVerts; i++) {
                                struct SmoothingData_Simple *sd = 
&smooth_data[i];
 
-                               float lambda_w = lambda * smooth_weights[i];
                                mul_v3_fl(sd->delta, vertex_edge_count_div[i]);
-                               interp_v3_v3v3(vertexCos[i], vertexCos[i], 
sd->delta, lambda_w);
+                               interp_v3_v3v3(vertexCos[i], vertexCos[i], 
sd->delta, smooth_weights[i]);
 
                                memset(sd, 0, sizeof(*sd));
                        }
@@ -260,11 +262,8 @@ static void smooth_iter__simple(
 
 
 /* -------------------------------------------------------------------- */
-/* Simple Weighted Smoothing
- *
- * (average of surrounding verts)
+/* Edge-Length Weighted Smoothing
  */
-
 static void smooth_iter__length_weight(
         CorrectiveSmoothModifierData *csmd, DerivedMesh *dm,
         float (*vertexCos)[3], unsigned int numVerts,

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to