WM: batch rename collections outside the outliner
Use selected objects collection instances to rename in the 3D view.
This commit is contained in:
parent
54fb1a75ee
commit
c11c2a4b91
|
@ -2597,6 +2597,20 @@ class WM_OT_batch_rename(Operator):
|
|||
"name",
|
||||
"Object(s)",
|
||||
)
|
||||
elif data_type == 'COLLECTION':
|
||||
data = (
|
||||
tuple(set(
|
||||
ob.instance_collection
|
||||
for ob in context.selected_objects
|
||||
if ((ob.instance_type == 'COLLECTION') and
|
||||
(collection := ob.instance_collection) is not None and
|
||||
(collection.library is None))
|
||||
))
|
||||
if only_selected else
|
||||
[id for id in bpy.data.collections if id.library is None],
|
||||
"name",
|
||||
"Collection(s)",
|
||||
)
|
||||
elif data_type == 'MATERIAL':
|
||||
data = (
|
||||
tuple(set(
|
||||
|
|
Loading…
Reference in New Issue