UI: Improvements to Confirmation of Apply Modifier

A more informative confirmation dialog to confirm that the user wishes
to apply modifier to an object with multiple users.

Pull Request: https://projects.blender.org/blender/blender/pulls/117156
This commit is contained in:
Harley Acheson
2024-02-24 01:38:34 +01:00
parent 2c8a3243ee
commit 5eda7c9fd3

View File

@@ -76,6 +76,8 @@
#include "BKE_softbody.h"
#include "BKE_volume.hh"
#include "BLT_translation.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_build.hh"
#include "DEG_depsgraph_query.hh"
@@ -1812,8 +1814,14 @@ static int modifier_apply_invoke(bContext *C, wmOperator *op, const wmEvent *eve
RNA_property_boolean_set(op->ptr, prop, true);
}
if (RNA_property_boolean_get(op->ptr, prop)) {
return WM_operator_confirm_message(
C, op, "Make object data single-user and apply modifier");
return WM_operator_confirm_ex(
C,
op,
IFACE_("Apply Modifier"),
IFACE_("Make data single-user, apply modifier, and remove it from the list."),
IFACE_("Apply"),
ALERT_ICON_WARNING,
false);
}
}
return modifier_apply_exec(C, op);