Turn grayscale preview on if any channel toggles are active for motion tracking.

This commit is contained in:
Keir Mierle 2011-12-04 13:58:40 +00:00
parent 4bd3a296bb
commit f1454ec399
3 changed files with 6 additions and 3 deletions

@ -361,7 +361,7 @@ class CLIP_PT_track(Panel):
row.separator()
sub = row.row()
sub.prop(act_track, "preview_grayscale", text="B/W", toggle=True)
sub.prop(act_track, "use_grayscale_preview", text="B/W", toggle=True)
layout.separator()

@ -949,7 +949,10 @@ static ImBuf *get_area_imbuf(ImBuf *ibuf, MovieTrackingTrack *track, MovieTracki
origin[1]= y1-margin;
}
if (track->flag & TRACK_PREVIEW_GRAYSCALE) {
if ((track->flag & TRACK_PREVIEW_GRAYSCALE) ||
(track->flag & TRACK_DISABLE_RED) ||
(track->flag & TRACK_DISABLE_GREEN) ||
(track->flag & TRACK_DISABLE_BLUE) ) {
disable_imbuf_channels(tmpibuf, track, 1 /* grayscale */);
}

@ -674,7 +674,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
/* preview_grayscale */
prop= RNA_def_property(srna, "preview_grayscale", PROP_BOOLEAN, PROP_NONE);
prop= RNA_def_property(srna, "use_grayscale_preview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TRACK_PREVIEW_GRAYSCALE);
RNA_def_property_ui_text(prop, "Grayscale", "Display what the tracking algorithm sees in the preview");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);