UI: Improvements to Confirmation of Apply Transforms

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

Pull Request: https://projects.blender.org/blender/blender/pulls/117157
This commit is contained in:
Harley Acheson
2024-02-24 01:32:53 +01:00
parent 06d3627c43
commit 2c8a3243ee

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);