From e2e992a425b254d360a60cd01b3dfb4929419cab Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Tue, 21 Jan 2025 11:31:24 +0100 Subject: [PATCH] UI: Add icons to Batch Rename data type menu Add icons to better identify data types in the Batch Rename type menu. Makes it easy for users to recognize icons they are already familiar with, especially when following tutorials in English while using a translated UI. Also fixes 'Light' being singular, while others were plural. Pull Request: https://projects.blender.org/blender/blender/pulls/130300 --- scripts/startup/bl_operators/wm.py | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/scripts/startup/bl_operators/wm.py b/scripts/startup/bl_operators/wm.py index b3160ec5c15..a8e5a9bcfa9 100644 --- a/scripts/startup/bl_operators/wm.py +++ b/scripts/startup/bl_operators/wm.py @@ -2750,31 +2750,31 @@ class WM_OT_batch_rename(Operator): data_type: EnumProperty( name="Type", items=( - ('OBJECT', "Objects", ""), - ('COLLECTION', "Collections", ""), - ('MATERIAL', "Materials", ""), + ('OBJECT', "Objects", "", 'OBJECT_DATA', 0), + ('COLLECTION', "Collections", "", 'OUTLINER_COLLECTION', 1), + ('MATERIAL', "Materials", "", 'MATERIAL_DATA', 2), None, # Enum identifiers are compared with `object.type`. # Follow order in "Add" menu. - ('MESH', "Meshes", ""), - ('CURVE', "Curves", ""), - ('META', "Metaballs", ""), - ('VOLUME', "Volumes", ""), - ('GPENCIL', "Grease Pencils", ""), - ('ARMATURE', "Armatures", ""), - ('LATTICE', "Lattices", ""), - ('LIGHT', "Light", ""), - ('LIGHT_PROBE', "Light Probes", ""), - ('CAMERA', "Cameras", ""), - ('SPEAKER', "Speakers", ""), + ('MESH', "Meshes", "", 'MESH_DATA', 3), + ('CURVE', "Curves", "", 'CURVE_DATA', 4), + ('META', "Metaballs", "", 'META_DATA', 5), + ('VOLUME', "Volumes", "", 'VOLUME_DATA', 6), + ('GPENCIL', "Grease Pencils", "", 'OUTLINER_DATA_GREASEPENCIL', 7), + ('ARMATURE', "Armatures", "", 'ARMATURE_DATA', 8), + ('LATTICE', "Lattices", "", 'LATTICE_DATA', 9), + ('LIGHT', "Lights", "", 'LIGHT_DATA', 10), + ('LIGHT_PROBE', "Light Probes", "", 'OUTLINER_DATA_LIGHTPROBE', 11), + ('CAMERA', "Cameras", "", 'CAMERA_DATA', 12), + ('SPEAKER', "Speakers", "", 'OUTLINER_DATA_SPEAKER', 13), None, - ('BONE', "Bones", ""), - ('NODE', "Nodes", ""), - ('SEQUENCE_STRIP', "Sequence Strips", ""), - ('ACTION_CLIP', "Action Clips", ""), + ('BONE', "Bones", "", 'BONE_DATA', 14), + ('NODE', "Nodes", "", 'NODETREE', 15), + ('SEQUENCE_STRIP', "Sequence Strips", "", 'SEQ_SEQUENCER', 16), + ('ACTION_CLIP', "Action Clips", "", 'ACTION', 17), None, - ('SCENE', "Scenes", ""), - ('BRUSH', "Brushes", ""), + ('SCENE', "Scenes", "", 'SCENE_DATA', 18), + ('BRUSH', "Brushes", "", 'BRUSH_DATA', 19), ), translation_context=i18n_contexts.id_id, description="Type of data to rename",