diff --git a/scripts/startup/bl_ui/space_view3d_toolbar.py b/scripts/startup/bl_ui/space_view3d_toolbar.py index ed0a7fb2df6..ba3a2d53081 100644 --- a/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1027,7 +1027,7 @@ class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel): col.active = context.sculpt_object.use_dynamic_topology_sculpting sub = col.column() - sub.active = (brush and brush.sculpt_tool != 'MASK') + sub.active = (brush and brush.sculpt_capabilities.has_dyntopo) or sculpt.detail_type_method == 'MANUAL' if sculpt.detail_type_method in {'CONSTANT', 'MANUAL'}: row = sub.row(align=True) row.prop(sculpt, "constant_detail_resolution") diff --git a/source/blender/makesrna/intern/rna_brush.cc b/source/blender/makesrna/intern/rna_brush.cc index 4d8dd65934f..be4a6641c83 100644 --- a/source/blender/makesrna/intern/rna_brush.cc +++ b/source/blender/makesrna/intern/rna_brush.cc @@ -569,6 +569,12 @@ static bool rna_BrushCapabilitiesSculpt_has_tilt_get(PointerRNA *ptr) return blender::bke::brush::supports_tilt(*br); } +static bool rna_BrushCapabilitiesSculpt_has_dyntopo_get(PointerRNA *ptr) +{ + const Brush *br = static_cast(ptr->data); + return blender::bke::brush::supports_dyntopo(*br); +} + static bool rna_BrushCapabilitiesImagePaint_has_accumulate_get(PointerRNA *ptr) { /* only support for draw brush */ @@ -1192,6 +1198,7 @@ static void rna_def_sculpt_capabilities(BlenderRNA *brna) SCULPT_BRUSH_CAPABILITY(has_direction, "Has Direction"); SCULPT_BRUSH_CAPABILITY(has_gravity, "Has Gravity"); SCULPT_BRUSH_CAPABILITY(has_tilt, "Has Tilt"); + SCULPT_BRUSH_CAPABILITY(has_dyntopo, "Has Dyntopo"); # undef SCULPT_CAPABILITY }