[Bf-blender-cvs] [ad87f81e383] temp-gpencil-automask: GPencil: Add new Automasking popover
Antonio Vazquez
noreply at git.blender.org
Fri Oct 7 16:59:38 CEST 2022
Commit: ad87f81e383535bd3bf6be1b894788a4199a2b49
Author: Antonio Vazquez
Date: Fri Oct 7 16:59:30 2022 +0200
Branches: temp-gpencil-automask
https://developer.blender.org/rBad87f81e383535bd3bf6be1b894788a4199a2b49
GPencil: Add new Automasking popover
Also removed from Brush settings the automasking
===================================================================
M release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M release/scripts/startup/bl_ui/space_view3d.py
M release/scripts/startup/bl_ui/space_view3d_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 b85d9624d59..83bb0f7dd8c 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -51,13 +51,6 @@ class GreasePencilSculptAdvancedPanel:
tool = brush.gpencil_sculpt_tool
gp_settings = brush.gpencil_settings
- col = layout.column(heading="Auto-Masking", align=True)
- col.prop(tool_settings.gpencil_sculpt, "use_automasking_stroke", text="Stroke")
- col.prop(tool_settings.gpencil_sculpt, "use_automasking_layer_stroke", text="Layer")
- col.prop(tool_settings.gpencil_sculpt, "use_automasking_material_stroke", text="Material")
- col.prop(tool_settings.gpencil_sculpt, "use_automasking_layer_active", text="Layer Active")
- col.prop(tool_settings.gpencil_sculpt, "use_automasking_material_active", text="Material Active")
-
if tool in {'SMOOTH', 'RANDOMIZE'}:
col = layout.column(heading="Affect", align=True)
col.prop(gp_settings, "use_edit_position", text="Position")
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index ada2993a16f..8e7d44d2cff 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -108,7 +108,7 @@ class VIEW3D_HT_tool_header(Header):
brush = context.tool_settings.gpencil_sculpt_paint.brush
if brush:
tool = brush.gpencil_sculpt_tool
- if tool != 'CLONE':
+ if tool in {'SMOOTH', 'RANDOMIZE'}:
layout.popover("VIEW3D_PT_tools_grease_pencil_sculpt_brush_popover")
layout.popover("VIEW3D_PT_tools_grease_pencil_sculpt_appearance")
elif tool_mode == 'WEIGHT_GPENCIL':
@@ -838,6 +838,13 @@ class VIEW3D_HT_header(Header):
text="Guides",
)
+ if object_mode == 'SCULPT_GPENCIL':
+ layout.popover(
+ panel="VIEW3D_PT_gpencil_sculpt_automasking",
+ text="",
+ icon="MOD_MASK"
+ )
+
layout.separator_spacer()
else:
# Transform settings depending on tool header visibility
@@ -7450,6 +7457,26 @@ def draw_gpencil_material_active(context, layout):
row.prop(ma, "name", text="")
+class VIEW3D_PT_gpencil_sculpt_automasking(Panel):
+ bl_space_type = 'VIEW_3D'
+ bl_region_type = 'HEADER'
+ bl_label = "Auto-masking"
+ bl_ui_units_x = 10
+
+ def draw(self, context):
+ layout = self.layout
+
+ tool_settings = context.scene.tool_settings
+ layout.label(text="Auto-masking")
+
+ col = layout.column(align=True)
+ col.prop(tool_settings.gpencil_sculpt, "use_automasking_stroke", text="Stroke")
+ col.prop(tool_settings.gpencil_sculpt, "use_automasking_layer_stroke", text="Layer")
+ col.prop(tool_settings.gpencil_sculpt, "use_automasking_material_stroke", text="Material")
+ col.prop(tool_settings.gpencil_sculpt, "use_automasking_layer_active", text="Layer Active")
+ col.prop(tool_settings.gpencil_sculpt, "use_automasking_material_active", text="Material Active")
+
+
class VIEW3D_PT_gpencil_sculpt_context_menu(Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'WINDOW'
@@ -8029,6 +8056,7 @@ classes = (
VIEW3D_PT_annotation_onion,
VIEW3D_PT_gpencil_multi_frame,
VIEW3D_PT_gpencil_curve_edit,
+ VIEW3D_PT_gpencil_sculpt_automasking,
VIEW3D_PT_quad_view,
VIEW3D_PT_view3d_stereo,
VIEW3D_PT_shading,
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 3357676bf2f..94ec387eb18 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -2042,7 +2042,7 @@ class VIEW3D_PT_tools_grease_pencil_sculpt_brush_popover(GreasePencilSculptAdvan
return False
tool = brush.gpencil_sculpt_tool
- return tool != 'CLONE'
+ return tool in {'SMOOTH', 'RANDOMIZE'}
# Grease Pencil weight painting tools
More information about the Bf-blender-cvs
mailing list