[Bf-blender-cvs] [2c357c22687] blender-v3.2-release: GPencil: Avoid console warnings when no Sculpt brush selected
Antonio Vazquez
noreply at git.blender.org
Wed Jun 22 13:03:00 CEST 2022
Commit: 2c357c226870c57ec381bc64942e1e4b6355db1f
Author: Antonio Vazquez
Date: Wed Jun 15 13:30:14 2022 +0200
Branches: blender-v3.2-release
https://developer.blender.org/rB2c357c226870c57ec381bc64942e1e4b6355db1f
GPencil: Avoid console warnings when no Sculpt brush selected
If the brush is deleted, the panel must not be filled.
To recreate the missing Brush is necessary to use `Reset All`
This fix part of T98904
===================================================================
M release/scripts/startup/bl_ui/properties_paint_common.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index 9a116aa1717..320b5f60911 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -1296,6 +1296,8 @@ def brush_basic_gpencil_paint_settings(layout, context, brush, *, compact=False)
def brush_basic_gpencil_sculpt_settings(layout, _context, brush, *, compact=False):
gp_settings = brush.gpencil_settings
+ if gp_settings is None:
+ return
tool = brush.gpencil_sculpt_tool
row = layout.row(align=True)
More information about the Bf-blender-cvs
mailing list