diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-05-02 17:05:04 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-05-02 17:05:04 +0300 |
commit | ab5d52a6db559b78ffaca71c7963e48371c786ff (patch) | |
tree | 99426ba2db29776a19a5703ad1a3b32ada1e9e84 /release/scripts/startup/bl_ui/properties_grease_pencil_common.py | |
parent | 4c3efb4320c16d5edf4bbd1062ee4587364587c3 (diff) |
GPencil: New Sculpt Auto masking options
Now it's possible to use auto masking at 3 levels:
* Stroke
* Layer
* Material
The masking options can be combined and allows to limit the effect of the sculpt brush.
Diff Revision: https://developer.blender.org/D14589
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_grease_pencil_common.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_grease_pencil_common.py | 32 |
1 files changed, 13 insertions, 19 deletions
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 481753d5e79..189210d8540 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -41,17 +41,7 @@ class AnnotationDrawingToolsPanel: row.prop_enum(tool_settings, "annotation_stroke_placement_view2d", 'IMAGE', text="Image") -class GreasePencilSculptOptionsPanel: - bl_label = "Sculpt Strokes" - - @classmethod - def poll(cls, context): - tool_settings = context.scene.tool_settings - settings = tool_settings.gpencil_sculpt_paint - brush = settings.brush - tool = brush.gpencil_sculpt_tool - - return bool(tool in {'SMOOTH', 'RANDOMIZE'}) +class GreasePencilSculptAdvancedPanel: def draw(self, context): layout = self.layout @@ -59,17 +49,21 @@ class GreasePencilSculptOptionsPanel: layout.use_property_decorate = False tool_settings = context.scene.tool_settings - settings = tool_settings.gpencil_sculpt_paint - brush = settings.brush - gp_settings = brush.gpencil_settings + brush = context.tool_settings.gpencil_sculpt_paint.brush tool = brush.gpencil_sculpt_tool + gp_settings = brush.gpencil_settings - if tool in {'SMOOTH', 'RANDOMIZE'}: - layout.prop(gp_settings, "use_edit_position", text="Affect Position") - layout.prop(gp_settings, "use_edit_strength", text="Affect Strength") - layout.prop(gp_settings, "use_edit_thickness", text="Affect Thickness") + col = layout.column(heading="Auto-Masking", align=True) + col.prop(gp_settings, "use_automasking_stroke", text="Stroke") + col.prop(gp_settings, "use_automasking_layer", text="Layer") + col.prop(gp_settings, "use_automasking_material", text="Material") - layout.prop(gp_settings, "use_edit_uv", text="Affect UV") + if tool in {'SMOOTH', 'RANDOMIZE'}: + col = layout.column(heading="Affect", align=True) + col.prop(gp_settings, "use_edit_position", text="Position") + col.prop(gp_settings, "use_edit_strength", text="Strength") + col.prop(gp_settings, "use_edit_thickness", text="Thickness") + col.prop(gp_settings, "use_edit_uv", text="UV") # GP Object Tool Settings |