Fix #128767: Regression: Batch Rename failed to rename bones.

Regression from 8c3a3bb9a3, did not realize all items were not
necessarily actual IDs.
This commit is contained in:
Bastien Montagne
2024-10-09 15:57:19 +02:00
parent eac897bb38
commit e2705a432a

View File

@@ -2809,7 +2809,7 @@ 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
return data.id_data.is_editable and not data.id_data.override_library
mode = context.mode
scene = context.scene
@@ -3008,7 +3008,7 @@ class WM_OT_batch_rename(Operator):
"name",
descr,
)
data = ([id for id in data[0] if _is_editable(id)], data[1], data[2])
data = ([it for it in data[0] if _is_editable(it)], data[1], data[2])
return data