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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user