Paint: Rename curve and curve_preset

This commit renames the following DNA fields and corresponding RNA
properties to better represnt usage:

* `Brush.curve` to `Brush.curve_distance_falloff`
* `Brush.curve_preset` to `Brush.curve_distance_falloff_preset`

Pull Request: https://projects.blender.org/blender/blender/pulls/146254
This commit is contained in:
Sean Kim
2025-09-25 11:54:53 +02:00
committed by Sean Kim
parent b279e74889
commit 327a1925cf
32 changed files with 128 additions and 92 deletions

View File

@@ -184,8 +184,8 @@ class GreasePencilBrushFalloff:
row = col.row(align=True)
col.prop(brush, "curve_preset", text="")
if brush.curve_preset == 'CUSTOM':
layout.template_curve_mapping(brush, "curve", brush=True, use_negative_slope=True)
if brush.curve_distance_falloff_preset == 'CUSTOM':
layout.template_curve_mapping(brush, "curve_distance_falloff", brush=True, use_negative_slope=True)
col = layout.column(align=True)
row = col.row(align=True)

View File

@@ -630,7 +630,7 @@ class FalloffPanel(BrushPanel):
if not super().poll(context):
return False
settings = cls.paint_settings(context)
if not (settings and settings.brush and settings.brush.curve):
if not (settings and settings.brush and settings.brush.curve_distance_falloff):
return False
if cls.get_brush_mode(context) == 'SCULPT_CURVES':
brush = settings.brush
@@ -654,8 +654,8 @@ class FalloffPanel(BrushPanel):
row = col.row(align=True)
col.prop(brush, "curve_preset", text="")
if brush.curve_preset == 'CUSTOM':
layout.template_curve_mapping(brush, "curve", brush=True, use_negative_slope=True)
if brush.curve_distance_falloff_preset == 'CUSTOM':
layout.template_curve_mapping(brush, "curve_distance_falloff", brush=True, use_negative_slope=True)
col = layout.column(align=True)
row = col.row(align=True)

View File

@@ -871,8 +871,8 @@ class VIEW3D_PT_tools_weight_gradient(Panel, View3DPaintPanel):
col = layout.column(align=True)
col.prop(brush, "curve_preset", expand=True)
if brush.curve_preset == 'CUSTOM':
layout.template_curve_mapping(brush, "curve", brush=True)
if brush.curve_distance_falloff_preset == 'CUSTOM':
layout.template_curve_mapping(brush, "curve_distance_falloff", brush=True)
col = layout.column(align=True)
row = col.row(align=True)
@@ -1616,7 +1616,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_weight_falloff(GreasePencilBrushFallof
tool_settings = context.tool_settings
settings = tool_settings.gpencil_weight_paint
brush = settings.brush
return (brush and brush.curve)
return (brush and brush.curve_distance_falloff)
class VIEW3D_PT_tools_grease_pencil_weight_options(Panel, View3DPanel, GreasePencilWeightPanel):
@@ -1719,7 +1719,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_vertex_falloff(GreasePencilBrushFallof
def poll(cls, context):
tool_settings = context.tool_settings
settings = tool_settings.gpencil_vertex_paint
return (settings and settings.brush and settings.brush.curve)
return (settings and settings.brush and settings.brush.curve_distance_falloff)
class VIEW3D_PT_tools_grease_pencil_brush_vertex_palette(View3DPanel, Panel):