From 8b02c7c0001fbdd7a72b6086f590e131e35c7dab Mon Sep 17 00:00:00 2001 From: LegendaryGuard Date: Wed, 7 Dec 2022 00:08:16 +0100 Subject: [PATCH] Add Blender script to remove all Xonotic player animation actions to be executed using Python console inside Blender --- .../xon_player_model_action_remover.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 models/player/blender_scripts/xon_player_model_action_remover.py diff --git a/models/player/blender_scripts/xon_player_model_action_remover.py b/models/player/blender_scripts/xon_player_model_action_remover.py new file mode 100644 index 0000000..21e162a --- /dev/null +++ b/models/player/blender_scripts/xon_player_model_action_remover.py @@ -0,0 +1,20 @@ +# script by LegendGuard +# used in Blender 2.79b +# wipes all animation actions (made for Xonotic player models) +import bpy + +# note: when executed, ignore warnings +# these tell some of these actions weren't found, but it's ok, no problem, works and ends at the last line + +def removeAction(name): + try: + bpy.data.actions.remove(bpy.data.actions[name]) + except: + print(f"WARNING: This action called <{name}> does not exist!") + +nameActions = ["backleft", "backright", "deadone", "deadtwo", "dieone", "dietwo", "draw", "duck", "duckbackwardleft", "duckbackwardright", "duckwalkforwardleft", "duckforwardleft", "duckforwardright", "duckidle", "duckjump", "duckstrafeleft", "duckstraferight", "duckwalk", "duckwalkbackwards", "fly", "forwardleft", "forwardright", "idle", "jump", "melee", "painone", "paintwo", "run", "runbackwards", "shoot", "strafeleft", "straferight", "taunt"] + +for i in range(len(nameActions)): + removeAction(nameActions[i]) + +print("ALL XONOTIC PLAYER ANIMATION ACTIONS REMOVED!") \ No newline at end of file -- 2.39.2