Fix #142706: Batch Rename doesn't work

Caused by 20383e4d82

Additionally, this updates the operator to use the correct object type,
so that the functionality works with new Grease Pencil IDs.

Pull Request: https://projects.blender.org/blender/blender/pulls/142742
This commit is contained in:
Sean Kim
2025-07-22 17:41:21 +02:00
committed by Sean Kim
parent 2a68d9a9a8
commit b2140771ea

View File

@@ -2763,7 +2763,7 @@ class WM_OT_batch_rename(Operator):
('CURVE', "Curves", "", 'CURVE_DATA', 4),
('META', "Metaballs", "", 'META_DATA', 5),
('VOLUME', "Volumes", "", 'VOLUME_DATA', 6),
('GPENCIL', "Grease Pencils", "", 'OUTLINER_DATA_GREASEPENCIL', 7),
('GREASEPENCIL', "Grease Pencils", "", 'OUTLINER_DATA_GREASEPENCIL', 7),
('ARMATURE', "Armatures", "", 'ARMATURE_DATA', 8),
('LATTICE', "Lattices", "", 'LATTICE_DATA', 9),
('LIGHT', "Lights", "", 'LIGHT_DATA', 10),
@@ -2912,7 +2912,7 @@ class WM_OT_batch_rename(Operator):
'CURVE': ("curves", iface_("Curve(s)"), bpy.types.Curve),
'META': ("metaballs", iface_("Metaball(s)"), bpy.types.MetaBall),
'VOLUME': ("volumes", iface_("Volume(s)"), bpy.types.Volume),
'GPENCIL': ("grease_pencils", iface_("Grease Pencil(s)"), bpy.types.GreasePencil),
'GREASEPENCIL': ("grease_pencils_v3", iface_("Grease Pencil(s)"), bpy.types.GreasePencilv3),
'ARMATURE': ("armatures", iface_("Armature(s)"), bpy.types.Armature),
'LATTICE': ("lattices", iface_("Lattice(s)"), bpy.types.Lattice),
'LIGHT': ("lights", iface_("Light(s)"), bpy.types.Light),