Cleanup: remove UV handling from OBJECT_OT_modifier_convert

It doesn't make sense to merge UV's when applying a particle-system.
This commit is contained in:
Campbell Barton 2022-05-31 17:42:44 +10:00
parent c338388354
commit 993fd985f0
1 changed files with 0 additions and 14 deletions

View File

@ -1618,19 +1618,12 @@ static int modifier_convert_exec(bContext *C, wmOperator *op)
ViewLayer *view_layer = CTX_data_view_layer(C);
Object *ob = ED_object_active_context(C);
ModifierData *md = edit_modifier_property_get(op, ob, 0);
const ModifierTypeInfo *mti = BKE_modifier_get_info((ModifierType)md->type);
const bool do_merge_customdata = RNA_boolean_get(op->ptr, "merge_customdata");
if (!md || !ED_object_modifier_convert_psys_to_mesh(
op->reports, bmain, depsgraph, view_layer, ob, md)) {
return OPERATOR_CANCELLED;
}
if (do_merge_customdata &&
(mti->type & (eModifierTypeType_Constructive | eModifierTypeType_Nonconstructive))) {
BKE_mesh_merge_customdata_for_apply_modifier((Mesh *)ob->data);
}
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
@ -1658,13 +1651,6 @@ void OBJECT_OT_modifier_convert(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
edit_modifier_properties(ot);
RNA_def_boolean(
ot->srna,
"merge_customdata",
true,
"Merge UV's",
"Merge UV coordinates that share a vertex to account for imprecision in some modifiers");
}
/** \} */