[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47267] branches/soc-2011-tomato/source/ blender/editors/mask/mask_ops.c: Fix adding feather points when there' s deformed spline for mask

Sergey Sharybin sergey.vfx at gmail.com
Thu May 31 12:01:22 CEST 2012


Revision: 47267
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47267
Author:   nazgul
Date:     2012-05-31 10:01:21 +0000 (Thu, 31 May 2012)
Log Message:
-----------
Fix adding feather points when there's deformed spline for mask

Deformed spline should be re-evaluated after adding new feather points
Used both BKE_mask_update_display and DAG_id_tag_update because of:

- If adding feather point is happening from macro which adds point and
  slides it, deformed spline should be updated immediatelly so sliding
  operator will use updated feather,
- If adding happens outside of such macro, update DAG is necessary to
  make needed updates in other areas (such as compositor, i.e.)

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/editors/mask/mask_ops.c

Modified: branches/soc-2011-tomato/source/blender/editors/mask/mask_ops.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/mask/mask_ops.c	2012-05-31 09:50:50 UTC (rev 47266)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_ops.c	2012-05-31 10:01:21 UTC (rev 47267)
@@ -1317,12 +1317,17 @@
 		return OPERATOR_FINISHED;
 
 	if (find_nearest_diff_point(C, mask, co, threshold, TRUE, &maskobj, &spline, &point, &u, NULL)) {
+		Scene *scene = CTX_data_scene(C);
 		float w = BKE_mask_point_weight(spline, point, u);
 
 		BKE_mask_point_add_uw(point, u, w);
 
+		BKE_mask_update_display(mask, scene->r.cfra);
+
 		WM_event_add_notifier(C, NC_MASK | NA_EDITED, mask);
 
+		DAG_id_tag_update(&mask->id, 0);
+
 		return OPERATOR_FINISHED;
 	}
 




More information about the Bf-blender-cvs mailing list