[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43908] trunk/blender: Movie Clip Editor: cleanup of display panels

Sergey Sharybin sergey.vfx at gmail.com
Sun Feb 5 14:44:08 CET 2012


Revision: 43908
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43908
Author:   nazgul
Date:     2012-02-05 13:43:58 +0000 (Sun, 05 Feb 2012)
Log Message:
-----------
Movie Clip Editor: cleanup of display panels

- Split display options into two panels:
  * Display, which contains all general display options related on editor itself
  * Marker Display, which contains options which makes sense for markers themselves
   and not used so often.
- Remove Show GPencil option which doesn't actually make sense because strokes might
  be disabled from GPencil panel
- Removed Show Pyramid option and show pyramid for KLT tracker as default.
- Added hotkey to toggle Show Disabled (Alt-D)
- Added hotkey to toggle Show Pattern (Alt-S)

Changes in interface and hotkeys are done by Sebastian Koenig.
 Thanks for the patch!

Own changes in interface were related on Aspect Ratio. It doesn't make
much sense for tracking (camera pixel aspect is what you'll want to use,
but for masking it would make much more sense because when you just
want to create a mask for footage you don't actually have camera).
Just removing from interface seems not so nice for now.

Merged from soc-2011-tomato rev43872

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43872

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/space_clip.py
    trunk/blender/source/blender/editors/gpencil/gpencil_paint.c
    trunk/blender/source/blender/editors/space_clip/clip_draw.c
    trunk/blender/source/blender/editors/space_clip/space_clip.c
    trunk/blender/source/blender/makesdna/DNA_space_types.h
    trunk/blender/source/blender/makesrna/intern/rna_space.c

Property Changed:
----------------
    trunk/blender/
    trunk/blender/source/blender/editors/space_outliner/


Property changes on: trunk/blender
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801
   + /branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872

Modified: trunk/blender/release/scripts/startup/bl_ui/space_clip.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_clip.py	2012-02-05 13:29:27 UTC (rev 43907)
+++ trunk/blender/release/scripts/startup/bl_ui/space_clip.py	2012-02-05 13:43:58 UTC (rev 43908)
@@ -547,23 +547,15 @@
 
         col = layout.column(align=True)
 
-        col.prop(sc, "show_marker_pattern", text="Pattern")
-        col.prop(sc, "show_marker_search", text="Search")
-        col.prop(sc, "show_pyramid_levels", text="Pyramid")
-
-        col.prop(sc, "show_track_path", text="Path")
-        row = col.row()
-        row.active = sc.show_track_path
-        row.prop(sc, "path_length", text="Length")
-
         col.prop(sc, "show_disabled", "Disabled Tracks")
+        col.prop(sc, "show_names", text="Names and Status")
         col.prop(sc, "show_bundles", text="3D Markers")
 
-        col.prop(sc, "show_names", text="Names and Status")
-        col.prop(sc, "show_tiny_markers", text="Compact Markers")
+        col.prop(sc, "use_mute_footage", text="Mute Footage")
+        col.prop(sc, "lock_selection")
 
-        col.prop(sc, "show_grease_pencil", text="Grease Pencil")
-        col.prop(sc, "use_mute_footage", text="Mute")
+        if sc.view == 'GRAPH':
+            col.prop(sc, "lock_time_cursor")
 
         if sc.mode == 'DISTORTION':
             col.prop(sc, "show_grid", text="Grid")
@@ -571,17 +563,36 @@
         elif sc.mode == 'RECONSTRUCTION':
             col.prop(sc, "show_stable", text="Stable")
 
-        col.prop(sc, "lock_selection")
-
-        if sc.view == 'GRAPH':
-            col.prop(sc, "lock_time_cursor")
-
         clip = sc.clip
         if clip:
             col.label(text="Display Aspect Ratio:")
-            col.prop(clip, "display_aspect", text="")
+            row = col.row()
+            row.prop(clip, "display_aspect", text="")
 
 
+class CLIP_PT_marker_display(Panel):
+    bl_space_type = 'CLIP_EDITOR'
+    bl_region_type = 'UI'
+    bl_label = "Marker Display"
+
+    def draw(self, context):
+        layout = self.layout
+        sc = context.space_data
+
+        col = layout.column(align=True)
+
+        row = col.row()
+        row.prop(sc, "show_marker_pattern", text="Pattern")
+        row.prop(sc, "show_marker_search", text="Search")
+
+        col.prop(sc, "show_tiny_markers", text="Thin Markers")
+        col.prop(sc, "show_track_path", text="Path")
+
+        row = col.row()
+        row.active = sc.show_track_path
+        row.prop(sc, "path_length", text="Length")
+
+
 class CLIP_PT_track_settings(Panel):
     bl_space_type = 'CLIP_EDITOR'
     bl_region_type = 'UI'

Modified: trunk/blender/source/blender/editors/gpencil/gpencil_paint.c
===================================================================
--- trunk/blender/source/blender/editors/gpencil/gpencil_paint.c	2012-02-05 13:29:27 UTC (rev 43907)
+++ trunk/blender/source/blender/editors/gpencil/gpencil_paint.c	2012-02-05 13:43:58 UTC (rev 43908)
@@ -1117,14 +1117,6 @@
 			p->custom_color[1]= 0.0f;
 			p->custom_color[2]= 0.5f;
 			p->custom_color[3]= 0.9f;
-
-			/* check that gpencil data is allowed to be drawn */
-			if ((sc->flag & SC_SHOW_GPENCIL)==0) {
-				p->status= GP_STATUS_ERROR;
-				if (G.f & G_DEBUG)
-					printf("Error: In active view, Grease Pencil not shown \n");
-				return 0;
-			}
 		}
 			break;
 

Modified: trunk/blender/source/blender/editors/space_clip/clip_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_clip/clip_draw.c	2012-02-05 13:29:27 UTC (rev 43907)
+++ trunk/blender/source/blender/editors/space_clip/clip_draw.c	2012-02-05 13:43:58 UTC (rev 43908)
@@ -586,7 +586,7 @@
 	}
 
 	/* pyramid */
-	if(sel && TRACK_SELECTED(track) && (sc->flag&SC_SHOW_PYRAMID_LEVELS) && (track->tracker==TRACKER_KLT) && (marker->flag&MARKER_DISABLED)==0) {
+	if(sel && TRACK_SELECTED(track) && (track->tracker==TRACKER_KLT) && (marker->flag&MARKER_DISABLED)==0) {
 		if(track->flag&TRACK_LOCKED) {
 			if(act) UI_ThemeColor(TH_ACT_MARKER);
 			else if(track->pat_flag&SELECT) UI_ThemeColorShade(TH_LOCK_MARKER, 64);
@@ -1307,7 +1307,7 @@
 	MovieClip *clip= ED_space_clip(sc);
 	ImBuf *ibuf;
 
-	if((sc->flag&SC_SHOW_GPENCIL)==0 || !clip)
+	if(!clip)
 		return;
 
 	if(onlyv2d) {

Modified: trunk/blender/source/blender/editors/space_clip/space_clip.c
===================================================================
--- trunk/blender/source/blender/editors/space_clip/space_clip.c	2012-02-05 13:29:27 UTC (rev 43907)
+++ trunk/blender/source/blender/editors/space_clip/space_clip.c	2012-02-05 13:43:58 UTC (rev 43908)
@@ -157,7 +157,7 @@
 
 	sc= MEM_callocN(sizeof(SpaceClip), "initclip");
 	sc->spacetype= SPACE_CLIP;
-	sc->flag= SC_SHOW_MARKER_PATTERN|SC_SHOW_TRACK_PATH|SC_SHOW_GPENCIL|SC_MANUAL_CALIBRATION|SC_SHOW_GRAPH_TRACKS|SC_SHOW_GRAPH_FRAMES;
+	sc->flag= SC_SHOW_MARKER_PATTERN|SC_SHOW_TRACK_PATH|SC_MANUAL_CALIBRATION|SC_SHOW_GRAPH_TRACKS|SC_SHOW_GRAPH_FRAMES;
 	sc->zoom= 1.0f;
 	sc->path_length= 20;
 	sc->scopes.track_preview_height= 120;
@@ -530,6 +530,12 @@
 	kmi= WM_keymap_add_item(keymap, "WM_OT_context_toggle", LKEY, KM_PRESS, 0, 0);
 	RNA_string_set(kmi->ptr, "data_path", "space_data.lock_selection");
 
+	kmi= WM_keymap_add_item(keymap, "WM_OT_context_toggle", DKEY, KM_PRESS, KM_ALT, 0);
+	RNA_string_set(kmi->ptr, "data_path", "space_data.show_disabled");
+
+	kmi= WM_keymap_add_item(keymap, "WM_OT_context_toggle", SKEY, KM_PRESS, KM_ALT, 0);
+	RNA_string_set(kmi->ptr, "data_path", "space_data.show_marker_search");
+
 	kmi= WM_keymap_add_item(keymap, "WM_OT_context_toggle", MKEY, KM_PRESS, 0, 0);
 	RNA_string_set(kmi->ptr, "data_path", "space_data.use_mute_footage");
 


Property changes on: trunk/blender/source/blender/editors/space_outliner
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/branches/soc-2011-tomato/source/blender/editors/space_outliner:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801
   + /branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/branches/soc-2011-tomato/source/blender/editors/space_outliner:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872

Modified: trunk/blender/source/blender/makesdna/DNA_space_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_space_types.h	2012-02-05 13:29:27 UTC (rev 43907)
+++ trunk/blender/source/blender/makesdna/DNA_space_types.h	2012-02-05 13:43:58 UTC (rev 43908)
@@ -896,11 +896,11 @@
 #define SC_SHOW_GRID			(1<<9)
 #define SC_SHOW_STABLE			(1<<10)
 #define SC_MANUAL_CALIBRATION	(1<<11)
-#define SC_SHOW_GPENCIL			(1<<12)
+/*#define SC_SHOW_GPENCIL			(1<<12)*/	/* UNUSED */
 #define SC_SHOW_FILTERS			(1<<13)
 #define SC_SHOW_GRAPH_FRAMES	(1<<14)
 #define SC_SHOW_GRAPH_TRACKS	(1<<15)
-#define SC_SHOW_PYRAMID_LEVELS	(1<<16)
+/*#define SC_SHOW_PYRAMID_LEVELS	(1<<16) */	/* UNUSED */
 #define SC_LOCK_TIMECURSOR		(1<<17)
 
 /* SpaceClip->mode */

Modified: trunk/blender/source/blender/makesrna/intern/rna_space.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_space.c	2012-02-05 13:29:27 UTC (rev 43907)
+++ trunk/blender/source/blender/makesrna/intern/rna_space.c	2012-02-05 13:43:58 UTC (rev 43908)
@@ -2888,12 +2888,6 @@
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_MARKER_SEARCH);
 	RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
 
-	/* show pyramid */
-	prop= RNA_def_property(srna, "show_pyramid_levels", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_ui_text(prop, "Show Pyramid ", "Show patterns for each pyramid level for markers (KLT only)");
-	RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_PYRAMID_LEVELS);
-	RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
-
 	/* lock to selection */
 	prop= RNA_def_property(srna, "lock_selection", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_ui_text(prop, "Lock to Selection", "Lock viewport to selected markers during playback");
@@ -2973,12 +2967,6 @@
 	RNA_def_property_ui_text(prop, "Manual Calibration", "Use manual calibration helpers");
 	RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
 
-	/* show stable */
-	prop= RNA_def_property(srna, "show_grease_pencil", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_GPENCIL);
-	RNA_def_property_ui_text(prop, "Show Grease Pencil", "Show grease pencil strokes over the footage");
-	RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
-
 	/* show filters */
 	prop= RNA_def_property(srna, "show_filters", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_FILTERS);




More information about the Bf-blender-cvs mailing list