From 7ac3de70fd0521d99eeb5d3893f8afd5769ff709 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 26 Feb 2025 15:35:35 +0100 Subject: [PATCH] Fix #135159: Copied modifier doesn't keep the name of the modifier `BKE_modifier_copy_ex` did it (which is called e.g. when copying the whole stack from one object to another), but when simply duplicating a modifier (`modifier_copy`), it was just ensuring a unique name (based on the default name) without copyig the existing name prior. Pull Request: https://projects.blender.org/blender/blender/pulls/135172 --- source/blender/editors/object/object_modifier.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/editors/object/object_modifier.cc b/source/blender/editors/object/object_modifier.cc index 651ce392a7d..057b26a655a 100644 --- a/source/blender/editors/object/object_modifier.cc +++ b/source/blender/editors/object/object_modifier.cc @@ -1640,6 +1640,7 @@ bool modifier_copy( ModifierData *nmd = BKE_modifier_new(md->type); BKE_modifier_copydata(md, nmd); BLI_insertlinkafter(&ob->modifiers, md, nmd); + STRNCPY(nmd->name, md->name); BKE_modifier_unique_name(&ob->modifiers, nmd); BKE_modifiers_persistent_uid_init(*ob, *nmd); BKE_object_modifier_set_active(ob, nmd);