Commit: 6aad3c7297aff43d623623bbf5fadc3ba8570871
Author: Antonio Vazquez
Date:   Tue Dec 27 16:45:09 2022 +0100
Branches: master
https://developer.blender.org/rB6aad3c7297aff43d623623bbf5fadc3ba8570871

GPencil: Show Display Cursor popover for Eraser

The Eraser tool was not showing the display cursor popover.

This commit fixes this inconsistency.

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

M       release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M       release/scripts/startup/bl_ui/properties_paint_common.py
M       release/scripts/startup/bl_ui/space_view3d.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 a3a69835a19..3b8da6d0e8d 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -69,11 +69,8 @@ class GreasePencilDisplayPanel:
         ob = context.active_object
         brush = context.tool_settings.gpencil_paint.brush
         if ob and ob.type == 'GPENCIL' and brush:
-            if context.mode == 'PAINT_GPENCIL':
-                return brush.gpencil_tool != 'ERASE'
-            else:
-                # GP Sculpt, Vertex and Weight Paint always have Brush Tip 
panel.
-                return True
+            return True
+
         return False
 
     def draw_header(self, context):
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py 
b/release/scripts/startup/bl_ui/properties_paint_common.py
index 6c060d57a6b..c912de8f3e4 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -1287,9 +1287,6 @@ def brush_basic_gpencil_paint_settings(layout, context, 
brush, *, compact=False)
             row = layout.row(align=True)
             row.prop(gp_settings, "eraser_thickness_factor")
 
-        row = layout.row(align=True)
-        row.prop(settings, "show_brush", text="Display Cursor")
-
     # FIXME: tools must use their own UI drawing!
     elif brush.gpencil_tool == 'FILL':
         use_property_split_prev = layout.use_property_split
diff --git a/release/scripts/startup/bl_ui/space_view3d.py 
b/release/scripts/startup/bl_ui/space_view3d.py
index 0eba15e4267..311fe6076db 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -99,12 +99,13 @@ class VIEW3D_HT_tool_header(Header):
         elif tool_mode == 'PAINT_GPENCIL':
             if is_valid_context:
                 brush = context.tool_settings.gpencil_paint.brush
-                if brush and brush.gpencil_tool != 'ERASE':
-                    if brush.gpencil_tool != 'TINT':
-                        
layout.popover("VIEW3D_PT_tools_grease_pencil_brush_advanced")
+                if brush:
+                    if brush.gpencil_tool != 'ERASE':
+                        if brush.gpencil_tool != 'TINT':
+                            
layout.popover("VIEW3D_PT_tools_grease_pencil_brush_advanced")
 
-                    if brush.gpencil_tool not in {'FILL', 'TINT'}:
-                        
layout.popover("VIEW3D_PT_tools_grease_pencil_brush_stroke")
+                        if brush.gpencil_tool not in {'FILL', 'TINT'}:
+                            
layout.popover("VIEW3D_PT_tools_grease_pencil_brush_stroke")
 
                     
layout.popover("VIEW3D_PT_tools_grease_pencil_paint_appearance")
         elif tool_mode == 'SCULPT_GPENCIL':

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to