Cleanup: Make format
This commit is contained in:
@@ -7723,6 +7723,7 @@ def km_3d_view_tool_edit_curve_draw(params):
|
|||||||
]},
|
]},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def km_3d_view_tool_edit_curves_draw(params):
|
def km_3d_view_tool_edit_curves_draw(params):
|
||||||
return (
|
return (
|
||||||
"3D View Tool: Edit Curves, Draw",
|
"3D View Tool: Edit Curves, Draw",
|
||||||
@@ -7734,6 +7735,7 @@ def km_3d_view_tool_edit_curves_draw(params):
|
|||||||
]},
|
]},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def km_3d_view_tool_edit_curve_pen(params):
|
def km_3d_view_tool_edit_curve_pen(params):
|
||||||
return (
|
return (
|
||||||
"3D View Tool: Edit Curve, Curve Pen",
|
"3D View Tool: Edit Curve, Curve Pen",
|
||||||
|
|||||||
@@ -1149,59 +1149,59 @@ class _defs_edit_mesh:
|
|||||||
|
|
||||||
|
|
||||||
def curve_draw_settings(context, layout, _tool, *, extra=False):
|
def curve_draw_settings(context, layout, _tool, *, extra=False):
|
||||||
# Tool settings initialize operator options.
|
# Tool settings initialize operator options.
|
||||||
tool_settings = context.tool_settings
|
tool_settings = context.tool_settings
|
||||||
cps = tool_settings.curve_paint_settings
|
cps = tool_settings.curve_paint_settings
|
||||||
region_type = context.region.type
|
region_type = context.region.type
|
||||||
|
|
||||||
if region_type == 'TOOL_HEADER':
|
if region_type == 'TOOL_HEADER':
|
||||||
if not extra:
|
if not extra:
|
||||||
layout.prop(cps, "curve_type", text="")
|
layout.prop(cps, "curve_type", text="")
|
||||||
layout.prop(cps, "depth_mode", expand=True)
|
layout.prop(cps, "depth_mode", expand=True)
|
||||||
layout.popover("TOPBAR_PT_tool_settings_extra", text="...")
|
layout.popover("TOPBAR_PT_tool_settings_extra", text="...")
|
||||||
return
|
return
|
||||||
|
|
||||||
layout.use_property_split = True
|
layout.use_property_split = True
|
||||||
layout.use_property_decorate = False
|
layout.use_property_decorate = False
|
||||||
|
|
||||||
|
if region_type != 'TOOL_HEADER':
|
||||||
|
layout.prop(cps, "curve_type")
|
||||||
|
layout.separator()
|
||||||
|
if cps.curve_type == 'BEZIER':
|
||||||
|
layout.prop(cps, "fit_method")
|
||||||
|
layout.prop(cps, "error_threshold")
|
||||||
if region_type != 'TOOL_HEADER':
|
if region_type != 'TOOL_HEADER':
|
||||||
layout.prop(cps, "curve_type")
|
row = layout.row(heading="Detect Corners", align=True)
|
||||||
layout.separator()
|
else:
|
||||||
if cps.curve_type == 'BEZIER':
|
row = layout.row(heading="Corners", align=True)
|
||||||
layout.prop(cps, "fit_method")
|
row.prop(cps, "use_corners_detect", text="")
|
||||||
layout.prop(cps, "error_threshold")
|
sub = row.row(align=True)
|
||||||
if region_type != 'TOOL_HEADER':
|
sub.active = cps.use_corners_detect
|
||||||
row = layout.row(heading="Detect Corners", align=True)
|
sub.prop(cps, "corner_angle", text="")
|
||||||
else:
|
layout.separator()
|
||||||
row = layout.row(heading="Corners", align=True)
|
|
||||||
row.prop(cps, "use_corners_detect", text="")
|
|
||||||
sub = row.row(align=True)
|
|
||||||
sub.active = cps.use_corners_detect
|
|
||||||
sub.prop(cps, "corner_angle", text="")
|
|
||||||
layout.separator()
|
|
||||||
|
|
||||||
col = layout.column(align=True)
|
col = layout.column(align=True)
|
||||||
col.prop(cps, "radius_taper_start", text="Taper Start", slider=True)
|
col.prop(cps, "radius_taper_start", text="Taper Start", slider=True)
|
||||||
col.prop(cps, "radius_taper_end", text="End", slider=True)
|
col.prop(cps, "radius_taper_end", text="End", slider=True)
|
||||||
col = layout.column(align=True)
|
col = layout.column(align=True)
|
||||||
col.prop(cps, "radius_min", text="Radius Min")
|
col.prop(cps, "radius_min", text="Radius Min")
|
||||||
col.prop(cps, "radius_max", text="Max")
|
col.prop(cps, "radius_max", text="Max")
|
||||||
col.prop(cps, "use_pressure_radius")
|
col.prop(cps, "use_pressure_radius")
|
||||||
|
|
||||||
if region_type != 'TOOL_HEADER' or cps.depth_mode == 'SURFACE':
|
if region_type != 'TOOL_HEADER' or cps.depth_mode == 'SURFACE':
|
||||||
layout.separator()
|
layout.separator()
|
||||||
|
|
||||||
if region_type != 'TOOL_HEADER':
|
if region_type != 'TOOL_HEADER':
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.prop(cps, "depth_mode", expand=True)
|
row.prop(cps, "depth_mode", expand=True)
|
||||||
if cps.depth_mode == 'SURFACE':
|
if cps.depth_mode == 'SURFACE':
|
||||||
col = layout.column()
|
col = layout.column()
|
||||||
col.prop(cps, "surface_offset")
|
col.prop(cps, "surface_offset")
|
||||||
col.prop(cps, "use_offset_absolute")
|
col.prop(cps, "use_offset_absolute")
|
||||||
col.prop(cps, "use_stroke_endpoints")
|
col.prop(cps, "use_stroke_endpoints")
|
||||||
if cps.use_stroke_endpoints:
|
if cps.use_stroke_endpoints:
|
||||||
colsub = layout.column(align=True)
|
colsub = layout.column(align=True)
|
||||||
colsub.prop(cps, "surface_plane")
|
colsub.prop(cps, "surface_plane")
|
||||||
|
|
||||||
|
|
||||||
class _defs_edit_curve:
|
class _defs_edit_curve:
|
||||||
@@ -1295,6 +1295,7 @@ class _defs_edit_curve:
|
|||||||
draw_settings=draw_settings,
|
draw_settings=draw_settings,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class _defs_edit_curves:
|
class _defs_edit_curves:
|
||||||
|
|
||||||
@ToolDef.from_fn
|
@ToolDef.from_fn
|
||||||
@@ -1317,6 +1318,7 @@ class _defs_edit_curves:
|
|||||||
draw_settings=curve_draw,
|
draw_settings=curve_draw,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class _defs_edit_text:
|
class _defs_edit_text:
|
||||||
|
|
||||||
@ToolDef.from_fn
|
@ToolDef.from_fn
|
||||||
|
|||||||
Reference in New Issue
Block a user