Fix: Disable symmetrize on invisible objects

This PR disables the `SCULPT_OT_symmetrize` operator on invisible objects

Addresses part of #112371
This commit is contained in:
Sean Kim
2024-02-27 19:13:26 +01:00
committed by Raul Fernandez Hernandez
parent ee179e2749
commit b5f76620e4
@@ -180,6 +180,12 @@ static int sculpt_symmetrize_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
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;
}
switch (BKE_pbvh_type(pbvh)) {
case PBVH_BMESH: {
/* Dyntopo Symmetrize. */