diff options
author | Campbell Barton <campbell@blender.org> | 2022-01-18 03:50:02 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-01-18 03:50:02 +0300 |
commit | 0fc9526178ad7024c9ac0a8af1ec4de957cafb21 (patch) | |
tree | a2f99c2c1f27d2c1a0613a1d365ed10c0d7cfadf /release | |
parent | 84f6d86445d59b011782c920dbc842a28bf2500b (diff) |
Fix for batch rename operating on library collections & materials
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index e99858a64a5..1d2225d7848 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -2538,7 +2538,7 @@ class WM_OT_batch_rename(Operator): return data_type_test if data_type == data_type_test: data = ( - [id for id in context.selected_ids if isinstance(id, Collection)] + [id for id in context.selected_ids if isinstance(id, Collection) and id.library is None] if only_selected else scene.collection.children_recursive, "name", @@ -2613,10 +2613,10 @@ class WM_OT_batch_rename(Operator): elif data_type == 'MATERIAL': data = ( tuple(set( - slot.material + id for ob in context.selected_objects for slot in ob.material_slots - if slot.material is not None + if (id := slot.material) is not None and id.library is None )) if only_selected else [id for id in bpy.data.materials if id.library is None], |