Fix T86465: Annotation Tool is missing in VSE Preview toolbar
authorAntonio Vazquez <blendergit@gmail.com>
Thu, 27 May 2021 17:44:53 +0000 (19:44 +0200)
committerAntonio Vazquez <blendergit@gmail.com>
Thu, 27 May 2021 17:53:23 +0000 (19:53 +0200)
Added missing topbar in VSE.

Also added the Stabilizer options to Topbar for all modes.

Reviewed By: mendio, pepeland

Maniphest Tasks: T86465

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

release/scripts/startup/bl_ui/properties_grease_pencil_common.py
release/scripts/startup/bl_ui/space_toolsystem_toolbar.py

index b6d70049bb9ac57ddede81cf2bcd10c1bfeb04ed..2e89ddcb1d4cdf583c8a03960bb5916118f2aca8 100644 (file)
@@ -407,7 +407,7 @@ class AnnotationDataPanel:
     bl_options = {'DEFAULT_CLOSED'}
 
     def draw_header(self, context):
-        if context.space_data.type not in {'VIEW_3D', 'TOPBAR'}:
+        if context.space_data.type not in {'VIEW_3D', 'TOPBAR', 'SEQUENCE_EDITOR'}:
             self.layout.prop(context.space_data, "show_annotation", text="")
 
     def draw(self, context):
index 1e52142c85c8d1b7e6342ab42a3bc1e38d678fa8..8c683c3f205823b1cf64c284062a8f77f0533596 100644 (file)
@@ -164,7 +164,7 @@ class _defs_annotate:
             gpl = context.active_annotation_layer
             if gpl is not None:
                 layout.label(text="Annotation:")
-                if context.space_data.type == 'VIEW_3D':
+                if context.space_data.type in ('VIEW_3D', 'SEQUENCE_EDITOR'):
                     if region_type == 'TOOL_HEADER':
                         sub = layout.split(align=True, factor=0.5)
                         sub.ui_units_x = 6.5
@@ -206,14 +206,22 @@ class _defs_annotate:
                 col = layout.row().column(align=True)
                 col.prop(props, "arrowstyle_start", text="Style Start")
                 col.prop(props, "arrowstyle_end", text="End")
-        elif tool.idname == "builtin.annotate" and region_type != 'TOOL_HEADER':
-            layout.separator()
+        elif tool.idname == "builtin.annotate":
             props = tool.operator_properties("gpencil.annotate")
-            layout.prop(props, "use_stabilizer", text="Stabilize Stroke")
-            col = layout.column(align=False)
-            col.active = props.use_stabilizer
-            col.prop(props, "stabilizer_radius", text="Radius", slider=True)
-            col.prop(props, "stabilizer_factor", text="Factor", slider=True)
+            if region_type == 'TOOL_HEADER':
+                row = layout.row()
+                row.prop(props, "use_stabilizer", text="Stabilize Stroke")
+                subrow = layout.row(align=False)
+                subrow.active = props.use_stabilizer
+                subrow.prop(props, "stabilizer_radius", text="Radius", slider=True)
+                subrow.prop(props, "stabilizer_factor", text="Factor", slider=True)
+            else:
+                layout.separator()
+                layout.prop(props, "use_stabilizer", text="Stabilize Stroke")
+                col = layout.column(align=False)
+                col.active = props.use_stabilizer
+                col.prop(props, "stabilizer_radius", text="Radius", slider=True)
+                col.prop(props, "stabilizer_factor", text="Factor", slider=True)
 
     @ToolDef.from_fn.with_args(draw_settings=draw_settings_common)
     def scribble(*, draw_settings):