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



commit 4eb8f5bc2bcdcb95f418f520178a9f0bf7ecf5ee
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]