[Bf-blender-cvs] [1472550ba19] blender2.8: UI: new clip editor panels and headers layout.

Sebastian Koenig noreply at git.blender.org
Thu Sep 27 14:19:30 CEST 2018


Commit: 1472550ba195a3278ee3eb2977515c2c3b62c9ce
Author: Sebastian Koenig
Date:   Thu Sep 27 12:44:51 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB1472550ba195a3278ee3eb2977515c2c3b62c9ce

UI: new clip editor panels and headers layout.

* Panels now use single column layout.
* Footage Info was moved into Footage Settings.
* Display settings are now in a popover in the header.
* Graph view shows tracking controls in the header center.

Differential Revision: https://developer.blender.org/D3643

===================================================================

M	release/scripts/startup/bl_ui/properties_mask_common.py
M	release/scripts/startup/bl_ui/space_clip.py
M	source/blender/makesrna/intern/rna_movieclip.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_mask_common.py b/release/scripts/startup/bl_ui/properties_mask_common.py
index 8f19d36f6b2..bd657280e4e 100644
--- a/release/scripts/startup/bl_ui/properties_mask_common.py
+++ b/release/scripts/startup/bl_ui/properties_mask_common.py
@@ -55,6 +55,8 @@ class MASK_PT_mask:
 
     def draw(self, context):
         layout = self.layout
+        layout.use_property_split = True
+        layout.use_property_decorate = False
 
         sc = context.space_data
         mask = sc.mask
@@ -77,6 +79,8 @@ class MASK_PT_layers:
 
     def draw(self, context):
         layout = self.layout
+        layout.use_property_split = True
+        layout.use_property_decorate = False
 
         sc = context.space_data
         mask = sc.mask
@@ -107,9 +111,9 @@ class MASK_PT_layers:
             layout.prop(active_layer, "blend")
             layout.prop(active_layer, "falloff")
 
-            row = layout.row(align=True)
-            row.prop(active_layer, "use_fill_overlap", text="Overlap")
-            row.prop(active_layer, "use_fill_holes", text="Holes")
+            col = layout.column()
+            col.prop(active_layer, "use_fill_overlap", text="Overlap")
+            col.prop(active_layer, "use_fill_holes", text="Holes")
 
 
 class MASK_PT_spline:
@@ -130,6 +134,8 @@ class MASK_PT_spline:
 
     def draw(self, context):
         layout = self.layout
+        layout.use_property_split = True
+        layout.use_property_decorate = False
 
         sc = context.space_data
         mask = sc.mask
@@ -137,11 +143,10 @@ class MASK_PT_spline:
 
         col = layout.column()
         col.prop(spline, "offset_mode")
-        col.prop(spline, "weight_interpolation")
+        col.prop(spline, "weight_interpolation", text="Interpolation")
 
-        row = col.row()
-        row.prop(spline, "use_cyclic")
-        row.prop(spline, "use_fill")
+        col.prop(spline, "use_cyclic")
+        col.prop(spline, "use_fill")
 
         col.prop(spline, "use_self_intersection_check")
 
@@ -166,6 +171,8 @@ class MASK_PT_point:
 
     def draw(self, context):
         layout = self.layout
+        layout.use_property_split = True
+        layout.use_property_decorate = False
 
         sc = context.space_data
         mask = sc.mask
@@ -188,17 +195,17 @@ class MASK_PT_point:
             row.prop(parent, "type", expand=True)
 
             col.prop_search(parent, "parent", tracking,
-                            "objects", icon='OBJECT_DATA', text="Object:")
+                            "objects", icon='OBJECT_DATA', text="Object")
 
             tracks_list = "tracks" if parent.type == 'POINT_TRACK' else "plane_tracks"
 
             if parent.parent in tracking.objects:
                 object = tracking.objects[parent.parent]
                 col.prop_search(parent, "sub_parent", object,
-                                tracks_list, icon='ANIM_DATA', text="Track:")
+                                tracks_list, icon='ANIM_DATA', text="Track")
             else:
                 col.prop_search(parent, "sub_parent", tracking,
-                                tracks_list, icon='ANIM_DATA', text="Track:")
+                                tracks_list, icon='ANIM_DATA', text="Track")
 
 
 class MASK_PT_display:
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index 05baf619b7c..1c1da75d7bb 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -44,6 +44,88 @@ class CLIP_UL_tracking_objects(UIList):
                          else 'OBJECT_DATA')
 
 
+class CLIP_PT_display(Panel):
+    bl_space_type = 'CLIP_EDITOR'
+    bl_region_type = 'HEADER'
+    bl_label = "Clip Display"
+    bl_ui_units_x = 13
+
+    def draw(self, context):
+        pass
+
+
+class CLIP_PT_marker_display(Panel):
+    bl_space_type = 'CLIP_EDITOR'
+    bl_region_type = 'HEADER'
+    bl_label = "Marker Display"
+    bl_parent_id = 'CLIP_PT_display'
+    bl_ui_units_x = 13
+
+    def draw(self, context):
+        layout = self.layout
+
+        view = context.space_data
+
+        row = layout.row()
+
+        col = row.column()
+        col.prop(view, "show_marker_pattern", text="Pattern")
+        col.prop(view, "show_marker_search", text="Search")
+
+        col.active = view.show_track_path
+        col.prop(view, "show_track_path", text="Path")
+        col.prop(view, "path_length", text="Length")
+
+        col = row.column()
+        col.prop(view, "show_disabled", text="Show Disabled")
+        col.prop(view, "show_names", text="Info")
+
+        if view.mode != 'MASK':
+            col.prop(view, "show_bundles", text="3D Markers")
+        col.prop(view, "show_tiny_markers", text="Draw Thin")
+
+
+class CLIP_PT_clip_display(Panel):
+    bl_space_type = 'CLIP_EDITOR'
+    bl_region_type = 'HEADER'
+    bl_label = "Clip Display"
+    bl_parent_id = 'CLIP_PT_display'
+    bl_ui_units_x = 13
+
+    def draw(self, context):
+        layout = self.layout
+
+        sc = context.space_data
+
+        col = layout.column(align=True)
+
+        row = layout.row(align=True)
+        row.prop(sc, "show_red_channel", text="R", toggle=True)
+        row.prop(sc, "show_green_channel", text="G", toggle=True)
+        row.prop(sc, "show_blue_channel", text="B", toggle=True)
+        row.separator()
+        row.prop(sc, "use_grayscale_preview", text="B/W", toggle=True)
+        row.separator()
+        row.prop(sc, "use_mute_footage", text="", icon='VISIBLE_IPO_ON', toggle=True)
+
+        layout.separator()
+
+
+        row = layout.row()
+        col = row.column()
+        col.prop(sc.clip_user, "use_render_undistorted", text="Render Undistorted")
+        col.prop(sc, "lock_selection", text="Lock to Selection")
+        col = row.column()
+        col.prop(sc, "show_stable", text="Show Stable")
+        col.prop(sc, "show_grid", text="Grid")
+        col.prop(sc, "use_manual_calibration", text="Calibration")
+
+        clip = sc.clip
+        if clip:
+            col = layout.column()
+            col.prop(clip, "display_aspect", text="Display Aspect Ratio")
+
+
 class CLIP_HT_header(Header):
     bl_space_type = 'CLIP_EDITOR'
 
@@ -58,7 +140,39 @@ class CLIP_HT_header(Header):
         layout.separator_spacer()
 
         row = layout.row()
-        row.template_ID(sc, "clip", open="clip.open")
+        if sc.view == 'CLIP':
+            row.template_ID(sc, "clip", open="clip.open")
+        else:
+            row = layout.row(align=True)
+            props = row.operator("clip.refine_markers", text="", icon='LOOP_BACK')
+            props.backwards = True
+            row.separator()
+
+            props = row.operator("clip.clear_track_path", text="", icon='BACK')
+            props.action = 'UPTO'
+            row.separator()
+
+            props = row.operator("clip.track_markers", text="", icon='FRAME_PREV')
+            props.backwards = True
+            props.sequence = False
+            props = row.operator("clip.track_markers", text="",
+                                 icon='PLAY_REVERSE')
+            props.backwards = True
+            props.sequence = True
+            props = row.operator("clip.track_markers", text="", icon='PLAY')
+            props.backwards = False
+            props.sequence = True
+            props = row.operator("clip.track_markers", text="", icon='FRAME_NEXT')
+            props.backwards = False
+            props.sequence = False
+            row.separator()
+
+            props = row.operator("clip.clear_track_path", text="", icon='FORWARD')
+            props.action = 'REMAINED'
+            row.separator()
+
+            props = row.operator("clip.refine_markers", text="", icon='LOOP_FORWARDS')
+            props.backwards = False
 
         layout.separator_spacer()
 
@@ -67,13 +181,21 @@ class CLIP_HT_header(Header):
             active_object = tracking.objects.active
 
             if sc.view == 'CLIP':
-                layout.prop(sc, "pivot_point", text="", icon_only=True)
+                layout.template_running_jobs()
 
                 r = active_object.reconstruction
 
                 if r.is_valid and sc.view == 'CLIP':
                     layout.label(text="Solve error: %.4f" %
                                  (r.average_error))
+
+                row = layout.row()
+                row.prop(sc, "pivot_point", text="", icon_only=True)
+                row = layout.row(align=True)
+                icon = 'LOCKED' if sc.lock_selection else 'UNLOCKED'
+                row.prop(sc, "lock_selection", icon=icon, text="")
+                row.popover(panel='CLIP_PT_display')
+
             elif sc.view == 'GRAPH':
                 row = layout.row(align=True)
                 row.prop(sc, "show_graph_only_selected", text="")
@@ -94,6 +216,7 @@ class CLIP_HT_header(Header):
                 else:
                     row.prop(sc, "show_filters", icon='DISCLOSURE_TRI_RIGHT',
                              text="Filters")
+
             elif sc.view == 'DOPESHEET':
                 dopesheet = tracking.dopesheet
 
@@ -123,10 +246,6 @@ class CLIP_HT_header(Header):
         layout.separator_spacer()
 
         if clip:
-            row = layout.row()
-            row.template_ID(sc, "mask", new="mask.new")
-
-            layout.separator_spacer()
 
             layout.prop(sc, "pivot_point", text="", icon_only=True)
 
@@ -136,6 +255,14 @@ class CLIP_HT_header(Header):
             sub.active = toolsettings.use_proportional_edit_mask
             sub.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True)
 
+            row = layout.row()
+            row.template_ID(sc, "mask", new="mask.new")
+            row.popover(panel='CLIP_PT_mask_display')
+            row = layout.row(align=True)
+            icon = 'LOCKED' if sc.lock_selection else 'UNLOCKED'
+            row.prop(sc, "lock_selection", icon=icon, text="")
+            row.popover(panel='CLIP_PT_display')
+
     def draw(self, context):
         layout = self.layout
 
@@ -151,8 +278,6 @@ class CLIP_HT_header(Header):
         else:
             self._draw_masking(context)
 
-        layout.template_running_jobs()
-
 
 class CLI

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list