[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46784] branches/soc-2011-tomato/source/ blender: No need to invert brute and normalization flags in rna.

Sergey Sharybin sergey.vfx at gmail.com
Fri May 18 21:22:50 CEST 2012


Revision: 46784
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46784
Author:   nazgul
Date:     2012-05-18 19:22:50 +0000 (Fri, 18 May 2012)
Log Message:
-----------
No need to invert brute and normalization flags in rna.
Also remove currently unused update callback.

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_tracking.c

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c	2012-05-18 19:17:55 UTC (rev 46783)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c	2012-05-18 19:22:50 UTC (rev 46784)
@@ -1734,8 +1734,13 @@
 
 				/* Configure the tracker */
 				options.motion_model = track->motion_model;
-				options.use_brute = ((track->algorithm_flag & TRACK_ALGORITHM_FLAG_USE_BRUTE) == 0);
-				options.use_normalization = ((track->algorithm_flag & TRACK_ALGORITHM_FLAG_USE_NORMALIZATION) == 0);
+
+				options.use_brute =
+					((track->algorithm_flag & TRACK_ALGORITHM_FLAG_USE_BRUTE) != 0);
+
+				options.use_normalization =
+					((track->algorithm_flag & TRACK_ALGORITHM_FLAG_USE_NORMALIZATION) != 0);
+
 				options.num_iterations = 50;
 				options.minimum_correlation = track->minimum_correlation;
 				options.sigma = 0.9;

Modified: branches/soc-2011-tomato/source/blender/makesrna/intern/rna_tracking.c
===================================================================
--- branches/soc-2011-tomato/source/blender/makesrna/intern/rna_tracking.c	2012-05-18 19:17:55 UTC (rev 46783)
+++ branches/soc-2011-tomato/source/blender/makesrna/intern/rna_tracking.c	2012-05-18 19:22:50 UTC (rev 46784)
@@ -195,13 +195,6 @@
 	}
 }
 
-static void rna_tracking_trackerPattern_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
-{
-	MovieTrackingTrack *track = (MovieTrackingTrack *)ptr->data;
-
-	BKE_tracking_clamp_track(track, CLAMP_PAT_DIM);
-}
-
 static void rna_tracking_trackerSearch_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
 {
 	MovieTrackingTrack *track = (MovieTrackingTrack *)ptr->data;
@@ -621,14 +614,14 @@
 
 	/* use_brute */
 	prop = RNA_def_property(srna, "default_use_brute", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_negative_sdna(prop, NULL, "default_algorithm_flag", TRACK_ALGORITHM_FLAG_USE_BRUTE);
+	RNA_def_property_boolean_sdna(prop, NULL, "default_algorithm_flag", TRACK_ALGORITHM_FLAG_USE_BRUTE);
 	RNA_def_property_ui_text(prop, "Prepass", "Use a brute-force translation-only initialization when tracking");
 	RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
 
 	/* default use_normalization */
 	prop = RNA_def_property(srna, "default_use_normalization", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_negative_sdna(prop, NULL, "default_algorithm_flag", TRACK_ALGORITHM_FLAG_USE_NORMALIZATION);
-	RNA_def_property_ui_text(prop, "Normalize", "Normalize light intensities while tracking. Slower.");
+	RNA_def_property_boolean_sdna(prop, NULL, "default_algorithm_flag", TRACK_ALGORITHM_FLAG_USE_NORMALIZATION);
+	RNA_def_property_ui_text(prop, "Normalize", "Normalize light intensities while tracking. Slower");
 	RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
 
 	/* default minmal correlation */
@@ -932,16 +925,16 @@
 
 	/* use_brute */
 	prop = RNA_def_property(srna, "use_brute", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_negative_sdna(prop, NULL, "algorithm_flag", TRACK_ALGORITHM_FLAG_USE_BRUTE);
+	RNA_def_property_boolean_sdna(prop, NULL, "algorithm_flag", TRACK_ALGORITHM_FLAG_USE_BRUTE);
 	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
 	RNA_def_property_ui_text(prop, "Prepass", "Use a brute-force translation only pre-track before refinement");
 	RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
 
 	/* use_brute */
 	prop = RNA_def_property(srna, "use_normalization", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_negative_sdna(prop, NULL, "algorithm_flag", TRACK_ALGORITHM_FLAG_USE_NORMALIZATION);
+	RNA_def_property_boolean_sdna(prop, NULL, "algorithm_flag", TRACK_ALGORITHM_FLAG_USE_NORMALIZATION);
 	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
-	RNA_def_property_ui_text(prop, "Normalize", "Normalize light intensities while tracking. Slower.");
+	RNA_def_property_ui_text(prop, "Normalize", "Normalize light intensities while tracking. Slower");
 	RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
 
 	/* markers */




More information about the Bf-blender-cvs mailing list