Merge branch 'blender-v2.81-release'
authorPablo Dobarro <pablodp606@gmail.com>
Thu, 31 Oct 2019 13:46:47 +0000 (14:46 +0100)
committerPablo Dobarro <pablodp606@gmail.com>
Thu, 31 Oct 2019 13:46:47 +0000 (14:46 +0100)
1  2 
release/scripts/startup/bl_ui/properties_paint_common.py

index 7b82878c58f0a1984f6172e39b08a3d7b0138787,609eb0184c489ffe406a58a20697ec0e6d294fe3..98e812cf02d2eb68e05bdd5f08f57c3664185614
@@@ -199,6 -199,8 +199,8 @@@ def brush_texpaint_common_options(_pane
  
      if projpaint:
          col.prop(brush, "use_alpha")
+     else:
+         col.prop(brush, "use_paint_antialiasing")
  
  
  # Used in both the View3D toolbar and texture properties
@@@ -365,7 -367,7 +367,7 @@@ def brush_basic_sculpt_settings(layout
          layout.row().prop(brush, "direction", expand=True, **({"text": ""} if compact else {}))
  
  
 -def brush_basic_gpencil_paint_settings(layout, _context, brush, *, compact=True):
 +def brush_basic_gpencil_paint_settings(layout, _context, brush, tool, *, compact=True, is_toolbar=False):
      gp_settings = brush.gpencil_settings
  
      # Brush details
          row = layout.row(align=True)
          row.prop(gp_settings, "fill_draw_mode", text="Boundary")
          row.prop(gp_settings, "show_fill_boundary", text="", icon='GRID')
 +        # Fill options
 +        if is_toolbar:
 +            settings = _context.tool_settings.gpencil_sculpt
 +            row = layout.row(align=True)
 +            sub = row.row(align=True)
 +            sub.popover(
 +                panel="TOPBAR_PT_gpencil_fill",
 +                text="Fill Options",
 +            )
 +        else:
 +            row = layout.row(align=True)
 +            row.prop(gp_settings, "fill_factor", text="Resolution")
 +            if gp_settings.fill_draw_mode != 'STROKE':
 +                row = layout.row(align=True)
 +                row.prop(gp_settings, "show_fill", text="Ignore Transparent Strokes")
 +                row = layout.row(align=True)
 +                row.prop(gp_settings, "fill_threshold", text="Threshold")
      else:  # brush.gpencil_tool == 'DRAW':
          row = layout.row(align=True)
          row.prop(brush, "size", text="Radius")
          row.prop(gp_settings, "pen_strength", slider=True)
          row.prop(gp_settings, "use_strength_pressure", text="", icon='STYLUS_PRESSURE')
  
 +    # FIXME: tools must use their own UI drawing!
 +    if tool.idname in {
 +            "builtin.arc",
 +            "builtin.curve",
 +            "builtin.line",
 +            "builtin.box",
 +            "builtin.circle",
 +            "builtin.polyline",
 +    }:
 +        settings = _context.tool_settings.gpencil_sculpt
 +        if is_toolbar:
 +            row = layout.row(align=True)
 +            row.prop(settings, "use_thickness_curve", text="", icon='CURVE_DATA')
 +            sub = row.row(align=True)
 +            sub.active = settings.use_thickness_curve
 +            sub.popover(
 +                panel="TOPBAR_PT_gpencil_primitive",
 +                text="Thickness Profile",
 +            )
 +        else:
 +            row = layout.row(align=True)
 +            row.prop(settings, "use_thickness_curve", text="Use Thickness Profile")
 +            sub = row.row(align=True)
 +            if settings.use_thickness_curve:
 +                # Curve
 +                layout.template_curve_mapping(settings, "thickness_primitive_curve", brush=True)
 +
  
  def brush_basic_gpencil_sculpt_settings(layout, context, brush, *, compact=False):
      tool_settings = context.tool_settings