diff --git a/source/blender/editors/sculpt_paint/sculpt_ops.cc b/source/blender/editors/sculpt_paint/sculpt_ops.cc index 6e2781df175..d803c27c01d 100644 --- a/source/blender/editors/sculpt_paint/sculpt_ops.cc +++ b/source/blender/editors/sculpt_paint/sculpt_ops.cc @@ -549,6 +549,16 @@ static int sculpt_mode_toggle_exec(bContext *C, wmOperator *op) if (!object::mode_compat_set(C, &ob, eObjectMode(mode_flag), op->reports)) { return OPERATOR_CANCELLED; } + + /* Being in sculpt mode on an invisible object is a confusing state; while switching the + * visibility of the current object shouldn't inherently change the mode, we prevent entering + * sculpt mode on an object that is already invisible to better align with how the mode toggle + * works currently. */ + const View3D *v3d = CTX_wm_view3d(C); + const Base *base = CTX_data_active_base(C); + if (!BKE_base_is_visible(v3d, base)) { + return OPERATOR_CANCELLED; + } } if (is_mode_set) {