From 8c3a3bb9a3d0ff3c57b2a8e7e81103b6aef56b78 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 23 Sep 2024 15:43:08 +0200 Subject: [PATCH] Fix #128006: Liboverride objects can be renamed using batch rename. Do not allow renaming liboverride IDs from batch-rename either. Users who really want to rename liboverrides should use python/RNA API instead, this should not be exposed to standard UI tools (as renaming liboverride IDs can lead to quite some confusing setups). --- scripts/startup/bl_operators/wm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/startup/bl_operators/wm.py b/scripts/startup/bl_operators/wm.py index 2566f5d382c..8dd5c363676 100644 --- a/scripts/startup/bl_operators/wm.py +++ b/scripts/startup/bl_operators/wm.py @@ -2751,6 +2751,8 @@ class WM_OT_batch_rename(Operator): @classmethod def _data_from_context(cls, context, data_type, only_selected, *, check_context=False): + def _is_editable(data): + return data.is_editable and not data.override_library mode = context.mode scene = context.scene @@ -2949,6 +2951,7 @@ class WM_OT_batch_rename(Operator): "name", descr, ) + data = ([id for id in data[0] if _is_editable(id)], data[1], data[2]) return data