Example #1
0
 def UV(context, layout, tool):
     if tool and tool.has_datablock:
         if context.mode == 'EDIT_MESH':
             tool_settings = context.tool_settings
             uv_sculpt = tool_settings.uv_sculpt
             brush = uv_sculpt.brush
             if brush:
                 UnifiedPaintPanel.prop_unified(
                     layout,
                     context,
                     brush,
                     "size",
                     pressure_name="use_pressure_size",
                     unified_name="use_unified_size",
                     slider=True,
                     header=True
                 )
                 UnifiedPaintPanel.prop_unified(
                     layout,
                     context,
                     brush,
                     "strength",
                     pressure_name="use_pressure_strength",
                     unified_name="use_unified_strength",
                     slider=True,
                     header=True
                 )
Example #2
0
 def UV(context, layout, tool):
     if tool and tool.has_datablock:
         if context.mode == 'EDIT_MESH':
             tool_settings = context.tool_settings
             uv_sculpt = tool_settings.uv_sculpt
             brush = uv_sculpt.brush
             if brush:
                 # NOTE: We don't draw UnifiedPaintSettings in the header to reduce clutter. D5928#136281
                 UnifiedPaintPanel.prop_unified(layout, context, brush, "size", pressure_name="use_pressure_size", slider=True)
                 UnifiedPaintPanel.prop_unified(layout, context, brush, "strength", pressure_name="use_pressure_strength", slider=True)
 def slider_strength(parent):
     # strength, use_strength_pressure
     pressure_name = "use_pressure_strength" if parent.capabilities.has_strength_pressure else None
     UnifiedPaintPanel.prop_unified(parent.layout,
                                    parent.context,
                                    parent.brush,
                                    "strength",
                                    pressure_name=pressure_name,
                                    unified_name="use_unified_strength",
                                    text="Strength",
                                    header=True)
     return 7.75
    def slider_radius(parent):
        size = "size"
        size_owner = parent.ups if parent.ups.use_unified_size else parent.brush
        if size_owner.use_locked_size == 'SCENE':
            size = "unprojected_radius"

        UnifiedPaintPanel.prop_unified(parent.layout,
                                       parent.context,
                                       parent.brush,
                                       size,
                                       pressure_name="use_pressure_size",
                                       unified_name="use_unified_size",
                                       text="Radius",
                                       slider=True,
                                       header=True)
        return 7.3