[Bf-blender-cvs] [11643ab8f75] sculpt-dev: Merge branch 'master' into sculpt-dev

Joseph Eagar noreply at git.blender.org
Mon Nov 14 18:48:13 CET 2022


Commit: 11643ab8f754d9b114a4ef43ec8e99aadaf624ee
Author: Joseph Eagar
Date:   Mon Nov 14 09:47:58 2022 -0800
Branches: sculpt-dev
https://developer.blender.org/rB11643ab8f754d9b114a4ef43ec8e99aadaf624ee

Merge branch 'master' into sculpt-dev

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



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

diff --cc release/scripts/startup/bl_ui/properties_paint_common.py
index 6d4b1af20f4,0e49a506e73..2fd34c78722
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@@ -2116,135 -933,77 +2117,135 @@@ def brush_settings_advanced(layout, con
          use_accumulate = capabilities.has_accumulate
          use_frontface = True
  
 -        col = layout.column(heading="Auto-Masking", align=True)
 -
 -        col = layout.column(align=True)
 -        col.prop(brush, "use_automasking_topology", text="Topology")
 -        col.prop(brush, "use_automasking_face_sets", text="Face Sets")
 +        UnifiedPaintPanel.channel_unified(layout.column(),
 +            context,
 +            brush,
 +            "automasking", expand=True)
 +        UnifiedPaintPanel.channel_unified(layout.column(),
 +            context,
 +            brush,
 +            "automasking_boundary_edges_propagation_steps")
  
 -        layout.separator()
 +        flags = UnifiedPaintPanel.get_channel_value(context, brush, "automasking")
- 
-         if "CONCAVITY" in flags:
-             UnifiedPaintPanel.channel_unified(layout.column(),
-                 context,
-                 brush,
-                 "concave_mask_factor",
-                 slider=True)
- 
-         enable_orig_normal = False
 +        
-         if "BRUSH_NORMAL" in flags:
-             UnifiedPaintPanel.channel_unified(layout.column(),
-                 context,
-                 brush,
-                 "normal_mask_limit",
-                 slider=True)
-             UnifiedPaintPanel.channel_unified(layout.column(),
-                 context,
-                 brush,
-                 "normal_mask_falloff",
-                 slider=True)
-             enable_orig_normal = True
- 
-         if "VIEW_NORMAL" in flags:
-             UnifiedPaintPanel.channel_unified(layout.column(),
-                 context,
-                 brush,
-                 "view_normal_mask_limit",
-                 slider=True)
-             UnifiedPaintPanel.channel_unified(layout.column(),
-                 context,
-                 brush,
-                 "view_normal_mask_falloff",
-                 slider=True)
-             enable_orig_normal = True
++        enable_orig_normal = False
  
 -        col = layout.column(align=True)
 -        col.prop(brush, "use_automasking_boundary_edges", text="Mesh Boundary")
 -        col.prop(brush, "use_automasking_boundary_face_sets", text="Face Sets Boundary")
 +        sub = layout.row()
 +        sub.enabled = enable_orig_normal
  
 -        if brush.use_automasking_boundary_edges or brush.use_automasking_boundary_face_sets:
 +        UnifiedPaintPanel.channel_unified(sub,
 +            context,
 +            brush,
 +            "automasking_use_original_normal")
++        
++        if "BOUNDARY_EDGE" in flags or "BOUNDARY_FACE_SETS" in flags:
+             col = layout.column()
+             col.use_property_split = False
+             split = col.split(factor=0.4)
+             col = split.column()
 -            split.prop(brush, "automasking_boundary_edges_propagation_steps")
 +
-         """
-         col = layout.column(heading="Auto-Masking", align=True)
- 
-         # topology automasking
-         col.prop(brush, "use_automasking_topology", text="Topology")
++            UnifiedPaintPanel.channel_unified(split,
++                context,
++                brush,
++                "automasking_boundary_edges_propagation_steps")
  
-         col.prop(brush, "use_automasking_concave")
+         layout.separator()
  
-         col2 = col.column()
-         col2.enabled = brush.use_automasking_concave
 -        col = layout.column(align=True)
 -        row = col.row()
 -        row.prop(brush, "use_automasking_cavity", text="Cavity")
++        #col = layout.column(align=True)
++        #row = col.row()
++        #row.prop(brush, "use_automasking_cavity", text="Cavity")
  
-         col2.prop(brush, "concave_mask_factor", text="Cavity Factor")
-         col2.prop(brush, "invert_automasking_concavity", text="Invert Cavity Mask")
 -        is_cavity_active = brush.use_automasking_cavity or brush.use_automasking_cavity_inverted
++        is_cavity_active = "CAVITY" in flags or "CAVITY_INVERTED" in flags
  
-         # face masks automasking
-         col.prop(brush, "use_automasking_face_sets", text="Face Sets")
+         if is_cavity_active:
 -            row.operator("sculpt.mask_from_cavity", text="Create Mask")
 -
 -        col.prop(brush, "use_automasking_cavity_inverted", text="Cavity (inverted)")
++            layout.operator("sculpt.mask_from_cavity", text="Create Mask")
  
-         # boundary edges/face sets automasking
-         col.prop(brush, "use_automasking_boundary_edges", text="Mesh Boundary")
-         col.prop(brush, "use_automasking_boundary_face_sets", text="Face Sets Boundary")
-         col.prop(brush, "use_automasking_cavity", text="Cavity")
-         col.prop(brush, "use_automasking_cavity_inverted", text="Cavity (Inverted)")
-         col.prop(brush, "use_automasking_start_normal", text="Area Normal")
-         col.prop(brush, "use_automasking_view_normal", text="View Normal")
+         if is_cavity_active:
+             col = layout.column(align=True)
 -            col.prop(brush, "automasking_cavity_factor", text="Factor")
 -            col.prop(brush, "automasking_cavity_blur_steps", text="Blur")
 +
-         col.separator()
-         col.prop(brush, "automasking_boundary_edges_propagation_steps")
-         """
++            UnifiedPaintPanel.channel_unified(col,
++                context,
++                brush,
++                "automasking_cavity_factor",
++                text="Factor")
++            UnifiedPaintPanel.channel_unified(col,
++                context,
++                brush,
++                "automasking_cavity_blur_steps",
++                text="Blur")
  
-         sculpt = context.tool_settings.sculpt
+             col = layout.column()
 -            col.prop(brush, "use_automasking_custom_cavity_curve", text="Custom Curve")
++            UnifiedPaintPanel.channel_unified(col,
++                context,
++                brush,
++                "use_automasking_custom_cavity_curve",
++                text="Custom Curve")
  
-         if brush.use_automasking_start_normal:
-             col.separator()
 -            if brush.use_automasking_custom_cavity_curve:
 -                col.template_curve_mapping(brush, "automasking_cavity_curve")
++            if UnifiedPaintPanel.get_channel_value(context, brush, "use_automasking_custom_cavity_curve"):
++                UnifiedPaintPanel.channel_unified(col,
++                    context,
++                    brush,
++                    "automasking_cavity_curve")
  
-             col.prop(sculpt, "automasking_start_normal_limit")
-             col.prop(sculpt, "automasking_start_normal_falloff")
+         layout.separator()
  
-         if brush.use_automasking_view_normal:
-             col.separator()
 -        col = layout.column(align=True)
 -        col.prop(brush, "use_automasking_view_normal", text="View Normal")
++        if "VIEW_NORMAL" in flags:
++            col = layout.column()
 +
-             col.prop(brush, "use_automasking_view_occlusion", text="Occlusion")
-             col.prop(sculpt, "automasking_view_normal_limit")
-             col.prop(sculpt, "automasking_view_normal_falloff")
++            UnifiedPaintPanel.channel_unified(col,
++                context,
++                brush,
++                "use_automasking_view_occlusion",
++                text="Occlusion")
  
-         if brush.use_automasking_cavity or brush.use_automasking_cavity_inverted:
-             col.separator()
 -        if brush.use_automasking_view_normal:
 -            col.prop(brush, "use_automasking_view_occlusion", text="Occlusion")
+             subcol = col.column(align=True)
 -            subcol.active = not brush.use_automasking_view_occlusion
 -            subcol.prop(sculpt, "automasking_view_normal_limit", text="Limit")
 -            subcol.prop(sculpt, "automasking_view_normal_falloff", text="Falloff")
++            subcol.active = not UnifiedPaintPanel.get_channel_value(context, brush, "use_automasking_view_occlusion")
  
-             col.prop(brush, "automasking_cavity_factor", text="Cavity Factor")
-             col.prop(brush, "automasking_cavity_blur_steps", text="Cavity Blur")
-             col.prop(brush, "use_automasking_custom_cavity_curve", text="Use Curve")
 -        col = layout.column()
 -        col.prop(brush, "use_automasking_start_normal", text="Area Normal")
++            UnifiedPaintPanel.channel_unified(subcol,
++                context,
++                brush,
++                "automasking_view_normal_limit",
++                text="Limit")
++            UnifiedPaintPanel.channel_unified(subcol,
++                context,
++                brush,
++                "automasking_view_normal_falloff",
++                text="Falloff")
  
-             if brush.use_automasking_custom_cavity_curve:
-                 col.template_curve_mapping(brush, "automasking_cavity_curve")
 -        if brush.use_automasking_start_normal:
++        if "BRUSH_NORMAL" in flags:
+             col = layout.column(align=True)
 -            col.prop(sculpt, "automasking_start_normal_limit", text="Limit")
 -            col.prop(sculpt, "automasking_start_normal_falloff", text="Falloff")
++            UnifiedPaintPanel.channel_unified(subcol,
++                context,
++                brush,
++                "automasking_start_normal_limit",
++                text="Limit")
++            UnifiedPaintPanel.channel_unified(subcol,
++                context,
++                brush,
++                "automasking_start_normal_falloff",
++                text="Falloff")
  
          layout.separator()
  
          # sculpt plane settings
          if capabilities.has_sculpt_plane:
              layout.prop(brush, "sculpt_plane")
 -            col = layout.column(heading="Original", align=True)
 -            col.prop(brush, "use_original_normal", text="Normal")
 -            col.prop(brush, "use_original

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list