[Bf-blender-cvs] [cd7ec0dac6a] master: WM: batch rename action clips
Iyad Ahmed
noreply at git.blender.org
Tue Sep 27 04:13:35 CEST 2022
Commit: cd7ec0dac6a8660411f21949674422d5aed4d256
Author: Iyad Ahmed
Date: Mon Sep 26 21:11:23 2022 +1000
Branches: master
https://developer.blender.org/rBcd7ec0dac6a8660411f21949674422d5aed4d256
WM: batch rename action clips
Batch rename for action clips works in outliner and 3d view.
Reviewed By: campbellbarton
Ref D15819
===================================================================
M release/scripts/startup/bl_operators/wm.py
===================================================================
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index f8cb57d638a..9d04cfd5bc8 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -2518,6 +2518,7 @@ class WM_OT_batch_rename(Operator):
('BONE', "Bones", ""),
('NODE', "Nodes", ""),
('SEQUENCE_STRIP', "Sequence Strips", ""),
+ ('ACTION_CLIP', "Action Clips", ""),
),
description="Type of data to rename",
)
@@ -2690,6 +2691,30 @@ class WM_OT_batch_rename(Operator):
"name",
iface_("Material(s)"),
)
+ elif data_type == "ACTION_CLIP":
+ data = (
+ (
+ # Outliner.
+ tuple(set(
+ action for id in context.selected_ids
+ if (((animation_data := id.animation_data) is not None) and
+ ((action := animation_data.action) is not None) and
+ (action.library is None))
+ ))
+ if space_type == 'OUTLINER' else
+ # 3D View (default).
+ tuple(set(
+ action for ob in context.selected_objects
+ if (((animation_data := ob.animation_data) is not None) and
+ ((action := animation_data.action) is not None) and
+ (action.library is None))
+ ))
+ )
+ if only_selected else
+ [id for id in bpy.data.actions if id.library is None],
+ "name",
+ iface_("Action(s)"),
+ )
elif data_type in object_data_type_attrs_map.keys():
attr, descr, ty = object_data_type_attrs_map[data_type]
data = (
More information about the Bf-blender-cvs
mailing list