[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43730] trunk/blender: Color channels used for tracking is now a part of default tracking settings and also a part of presets .

Sergey Sharybin sergey.vfx at gmail.com
Thu Jan 26 16:33:23 CET 2012


Revision: 43730
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43730
Author:   nazgul
Date:     2012-01-26 15:33:16 +0000 (Thu, 26 Jan 2012)
Log Message:
-----------
Color channels used for tracking is now a part of default tracking settings and also a part of presets.

Modified Paths:
--------------
    trunk/blender/release/scripts/presets/tracking_settings/blurry_footage.py
    trunk/blender/release/scripts/presets/tracking_settings/default.py
    trunk/blender/release/scripts/presets/tracking_settings/fast_motion.py
    trunk/blender/release/scripts/startup/bl_operators/clip.py
    trunk/blender/release/scripts/startup/bl_operators/presets.py
    trunk/blender/release/scripts/startup/bl_ui/space_clip.py
    trunk/blender/source/blender/blenkernel/intern/tracking.c
    trunk/blender/source/blender/makesdna/DNA_tracking_types.h
    trunk/blender/source/blender/makesrna/intern/rna_tracking.c

Modified: trunk/blender/release/scripts/presets/tracking_settings/blurry_footage.py
===================================================================
--- trunk/blender/release/scripts/presets/tracking_settings/blurry_footage.py	2012-01-26 15:04:25 UTC (rev 43729)
+++ trunk/blender/release/scripts/presets/tracking_settings/blurry_footage.py	2012-01-26 15:33:16 UTC (rev 43730)
@@ -9,3 +9,6 @@
 settings.default_frames_limit = 0
 settings.default_pattern_match = 'PREV_FRAME'
 settings.default_margin = 0
+settings.use_default_red_channel = True
+settings.use_default_green_channel = True
+settings.use_default_blue_channel = True

Modified: trunk/blender/release/scripts/presets/tracking_settings/default.py
===================================================================
--- trunk/blender/release/scripts/presets/tracking_settings/default.py	2012-01-26 15:04:25 UTC (rev 43729)
+++ trunk/blender/release/scripts/presets/tracking_settings/default.py	2012-01-26 15:33:16 UTC (rev 43730)
@@ -9,3 +9,6 @@
 settings.default_frames_limit = 0
 settings.default_pattern_match = 'KEYFRAME'
 settings.default_margin = 0
+settings.use_default_red_channel = True
+settings.use_default_green_channel = True
+settings.use_default_blue_channel = True

Modified: trunk/blender/release/scripts/presets/tracking_settings/fast_motion.py
===================================================================
--- trunk/blender/release/scripts/presets/tracking_settings/fast_motion.py	2012-01-26 15:04:25 UTC (rev 43729)
+++ trunk/blender/release/scripts/presets/tracking_settings/fast_motion.py	2012-01-26 15:33:16 UTC (rev 43730)
@@ -9,3 +9,6 @@
 settings.default_frames_limit = 0
 settings.default_pattern_match = 'PREV_FRAME'
 settings.default_margin = 5
+settings.use_default_red_channel = True
+settings.use_default_green_channel = True
+settings.use_default_blue_channel = True

Modified: trunk/blender/release/scripts/startup/bl_operators/clip.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/clip.py	2012-01-26 15:04:25 UTC (rev 43729)
+++ trunk/blender/release/scripts/startup/bl_operators/clip.py	2012-01-26 15:33:16 UTC (rev 43730)
@@ -113,6 +113,9 @@
     settings.default_frames_limit = track.frames_limit
     settings.default_pattern_match = track.pattern_match
     settings.default_margin = track.margin
+    settings.use_default_red_channel = track.use_red_channel
+    settings.use_default_green_channel = track.use_green_channel
+    settings.use_default_blue_channel = track.use_blue_channel
 
 
 class CLIP_OT_track_to_empty(Operator):

Modified: trunk/blender/release/scripts/startup/bl_operators/presets.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/presets.py	2012-01-26 15:04:25 UTC (rev 43729)
+++ trunk/blender/release/scripts/startup/bl_operators/presets.py	2012-01-26 15:33:16 UTC (rev 43730)
@@ -409,7 +409,10 @@
         "settings.default_search_size",
         "settings.default_frames_limit",
         "settings.default_pattern_match",
-        "settings.default_margin"
+        "settings.default_margin",
+        "settings.use_default_red_channel",
+        "settings.use_default_green_channel",
+        "settings.use_default_blue_channel"
     ]
 
     preset_subdir = "tracking_settings"

Modified: trunk/blender/release/scripts/startup/bl_ui/space_clip.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_clip.py	2012-01-26 15:04:25 UTC (rev 43729)
+++ trunk/blender/release/scripts/startup/bl_ui/space_clip.py	2012-01-26 15:33:16 UTC (rev 43730)
@@ -127,6 +127,13 @@
 
             col.separator()
 
+            row = col.row(align=True)
+            row.prop(settings, "use_default_red_channel", text="R", toggle=True)
+            row.prop(settings, "use_default_green_channel", text="G", toggle=True)
+            row.prop(settings, "use_default_blue_channel", text="B", toggle=True)
+
+            col.separator()
+
             sub = col.column(align=True)
             sub.prop(settings, "default_pattern_size")
             sub.prop(settings, "default_search_size")

Modified: trunk/blender/source/blender/blenkernel/intern/tracking.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/tracking.c	2012-01-26 15:04:25 UTC (rev 43729)
+++ trunk/blender/source/blender/blenkernel/intern/tracking.c	2012-01-26 15:33:16 UTC (rev 43730)
@@ -242,6 +242,7 @@
 	track->margin= settings->default_margin;
 	track->pattern_match= settings->default_pattern_match;
 	track->frames_limit= settings->default_frames_limit;
+	track->flag= settings->default_flag;
 
 	memset(&marker, 0, sizeof(marker));
 	marker.pos[0]= x;

Modified: trunk/blender/source/blender/makesdna/DNA_tracking_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_tracking_types.h	2012-01-26 15:04:25 UTC (rev 43729)
+++ trunk/blender/source/blender/makesdna/DNA_tracking_types.h	2012-01-26 15:33:16 UTC (rev 43730)
@@ -121,7 +121,10 @@
 	short default_frames_limit;			/* number of frames to be tarcked during single tracking session (if TRACKING_FRAMES_LIMIT is set) */
 	short default_margin;				/* margin from frame boundaries */
 	short default_pattern_match;		/* re-adjust every N frames */
+	short default_flag;					/* default flags like color channels used by default */
 
+	short pod;
+
 	/* ** common tracker settings ** */
 	short speed;			/* speed of tracking */
 
@@ -129,7 +132,7 @@
 	int keyframe1, keyframe2;	/* two keyframes for reconstrution initialization */
 
 	/* ** which camera intrinsics to refine. uses on the REFINE_* flags */
-	short refine_camera_intrinsics, pad2;
+	short refine_camera_intrinsics, pad23;
 
 	/* ** tool settings ** */
 
@@ -142,6 +145,8 @@
 
 	/* set object scale */
 	float object_distance;		/* distance between two bundles used for object scaling */
+
+	int pad3;
 } MovieTrackingSettings;
 
 typedef struct MovieTrackingStabilization {

Modified: trunk/blender/source/blender/makesrna/intern/rna_tracking.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_tracking.c	2012-01-26 15:04:25 UTC (rev 43729)
+++ trunk/blender/source/blender/makesrna/intern/rna_tracking.c	2012-01-26 15:33:16 UTC (rev 43730)
@@ -639,6 +639,26 @@
 	RNA_def_property_update(prop, 0, "rna_tracking_defaultSettings_searchUpdate");
 	RNA_def_property_ui_text(prop, "Search Size", "Size of search area for newly created tracks");
 
+	/* use_red_channel */
+	prop= RNA_def_property(srna, "use_default_red_channel", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_negative_sdna(prop, NULL, "default_flag", TRACK_DISABLE_RED);
+	RNA_def_property_ui_text(prop, "Use Red Channel", "Use red channel from footage for tracking");
+	RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
+
+	/* use_green_channel */
+	prop= RNA_def_property(srna, "use_default_green_channel", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_negative_sdna(prop, NULL, "default_flag", TRACK_DISABLE_GREEN);
+	RNA_def_property_ui_text(prop, "Use Green Channel", "Use green channel from footage for tracking");
+	RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
+
+	/* use_blue_channel */
+	prop= RNA_def_property(srna, "use_default_blue_channel", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_negative_sdna(prop, NULL, "default_flag", TRACK_DISABLE_BLUE);
+	RNA_def_property_ui_text(prop, "Use Blue Channel", "Use blue channel from footage for tracking");
+	RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
+
+	/* ** object tracking ** */
+
 	/* object distance */
 	prop= RNA_def_property(srna, "object_distance", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);



More information about the Bf-blender-cvs mailing list