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).
This commit is contained in:
Bastien Montagne 2024-09-23 15:43:08 +02:00
parent ecce5f45ac
commit 8c3a3bb9a3

View File

@ -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