Fix: Python errors in brush falloff panel
Caused by 327a1925cf
Pull Request: https://projects.blender.org/blender/blender/pulls/146830
This commit is contained in:
@@ -179,10 +179,10 @@ class GreasePencilBrushFalloff:
|
||||
|
||||
col = layout.column(align=True)
|
||||
if context.region.type == 'TOOL_HEADER':
|
||||
col.prop(brush, "curve_preset", expand=True)
|
||||
col.prop(brush, "curve_distance_falloff_preset", expand=True)
|
||||
else:
|
||||
row = col.row(align=True)
|
||||
col.prop(brush, "curve_preset", text="")
|
||||
col.prop(brush, "curve_distance_falloff_preset", text="")
|
||||
|
||||
if brush.curve_distance_falloff_preset == 'CUSTOM':
|
||||
layout.template_curve_mapping(brush, "curve_distance_falloff", brush=True, use_negative_slope=True)
|
||||
|
||||
@@ -649,10 +649,10 @@ class FalloffPanel(BrushPanel):
|
||||
|
||||
col = layout.column(align=True)
|
||||
if context.region.type == 'TOOL_HEADER':
|
||||
col.prop(brush, "curve_preset", expand=True)
|
||||
col.prop(brush, "curve_distance_falloff_preset", expand=True)
|
||||
else:
|
||||
row = col.row(align=True)
|
||||
col.prop(brush, "curve_preset", text="")
|
||||
col.prop(brush, "curve_distance_falloff_preset", text="")
|
||||
|
||||
if brush.curve_distance_falloff_preset == 'CUSTOM':
|
||||
layout.template_curve_mapping(brush, "curve_distance_falloff", brush=True, use_negative_slope=True)
|
||||
|
||||
@@ -1411,9 +1411,9 @@ class IMAGE_PT_uv_sculpt_curve(Panel):
|
||||
props = context.scene.tool_settings.uv_sculpt
|
||||
|
||||
col = layout.column()
|
||||
col.prop(props, "curve_preset", expand=True)
|
||||
col.prop(props, "curve_distance_falloff_preset", expand=True)
|
||||
|
||||
if props.curve_preset == 'CUSTOM':
|
||||
if props.curve_distance_falloff_preset == 'CUSTOM':
|
||||
col = layout.column()
|
||||
col.template_curve_mapping(props, "strength_curve")
|
||||
|
||||
|
||||
@@ -869,7 +869,7 @@ class VIEW3D_PT_tools_weight_gradient(Panel, View3DPaintPanel):
|
||||
brush = settings.brush
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.prop(brush, "curve_preset", expand=True)
|
||||
col.prop(brush, "curve_distance_falloff_preset", expand=True)
|
||||
|
||||
if brush.curve_distance_falloff_preset == 'CUSTOM':
|
||||
layout.template_curve_mapping(brush, "curve_distance_falloff", brush=True)
|
||||
|
||||
Reference in New Issue
Block a user