[Bf-blender-cvs] [0a83f32d79b] master: Fix T86465: Annotation Tool is missing in VSE Preview toolbar

Antonio Vazquez noreply at git.blender.org
Thu May 27 19:53:27 CEST 2021


Commit: 0a83f32d79bc70a9769f91c7694c50df15cc4ae8
Author: Antonio Vazquez
Date:   Thu May 27 19:44:53 2021 +0200
Branches: master
https://developer.blender.org/rB0a83f32d79bc70a9769f91c7694c50df15cc4ae8

Fix T86465: Annotation Tool is missing in VSE Preview toolbar

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

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

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

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

diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index b6d70049bb9..2e89ddcb1d4 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -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):
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 1e52142c85c..8c683c3f205 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -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):



More information about the Bf-blender-cvs mailing list