From: LegendaryGuard Date: Tue, 6 Dec 2022 23:08:16 +0000 (+0100) Subject: Add Blender script to remove all Xonotic player animation actions to be executed... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8b02c7c0001fbdd7a72b6086f590e131e35c7dab;p=xonotic%2Fmediasource.git Add Blender script to remove all Xonotic player animation actions to be executed using Python console inside Blender --- 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