Skip to content

Instantly share code, notes, and snippets.

@harumaxy
Last active August 3, 2024 13:27
Show Gist options
  • Save harumaxy/2dfab132f897d4d411d362eeae2eea90 to your computer and use it in GitHub Desktop.
Save harumaxy/2dfab132f897d4d411d362eeae2eea90 to your computer and use it in GitHub Desktop.
import bpy
actions = bpy.data.actions
loop_names = ["_run_", "_walk_", "_sprint_", "loop", "flail"]
# reanme actions
for action in actions:
action.name = action.name \
.replace("ALS_", "") \
.replace("_0_Mannequin_Skeleton", "") \
.replace("_0_AnimMan", "")
action.name = action.name.split(".")[0]
lowername = action.name.lower()
if any([n in lowername for n in loop_names]):
action.name = action.name.split("-")[0] + "-loop"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment