[gegl/soc-2013-n-point-deformation: 22/22] operations: npd: recompute MLS weights when it changed



commit 0c24c349a1eb029536f44a61432a86e75d7e3842
Author: Marek Dvoroznak <dvoromar gmail com>
Date:   Thu Sep 19 23:28:59 2013 +0200

    operations: npd: recompute MLS weights when it changed

 operations/external/npd.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/operations/external/npd.c b/operations/external/npd.c
index c4bdec2..c190ce0 100644
--- a/operations/external/npd.c
+++ b/operations/external/npd.c
@@ -286,6 +286,14 @@ process (GeglOperation       *operation,
   else
     {
       npd_set_deformation_type (model, o->ASAP_deformation, o->MLS_weights);
+
+      if (o->MLS_weights &&
+          model->hidden_model->MLS_weights_alpha != o->MLS_weights_alpha)
+        {
+          model->hidden_model->MLS_weights_alpha = o->MLS_weights_alpha;
+          npd_compute_MLS_weights (model);
+        }
+
       model->mesh_visible = o->mesh_visible;
 
       output_buffer = model->display->image.buffer;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]