UI: Improvements to Confirmation of Apply Transforms #117157

Merged
Harley Acheson merged 12 commits from Harley/blender:ConfirmApplyTransforms into main 2024-02-24 01:33:01 +01:00
1 changed files with 12 additions and 2 deletions

View File

@ -54,12 +54,16 @@
#include "BKE_scene.hh"
#include "BKE_tracking.h"
#include "BLT_translation.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_query.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "UI_interface.hh"
#include "WM_api.hh"
#include "WM_types.hh"
@ -1166,8 +1170,14 @@ static int object_transform_apply_invoke(bContext *C, wmOperator *op, const wmEv
RNA_property_boolean_set(op->ptr, prop, true);
}
if (RNA_property_boolean_get(op->ptr, prop)) {
return WM_operator_confirm_message(
C, op, "Create new object-data users and apply transformation");
return WM_operator_confirm_ex(C,
op,
IFACE_("Apply Object Transformations"),
IFACE_("Warning: Multiple objects share the same data.\nMake "
"single user and then apply transformations?"),
IFACE_("Apply"),
ALERT_ICON_WARNING,
false);
}
}
return object_transform_apply_exec(C, op);