From 0ca4d5ed12bdcd3404432820e8f92b7149722322 Mon Sep 17 00:00:00 2001 From: LegendaryGuard Date: Wed, 7 Dec 2022 14:16:58 +0100 Subject: [PATCH] Fix print exception and refactor array variable in the action remover script --- .../xon_player_model_action_remover.py | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/models/player/blender_scripts/xon_player_model_action_remover.py b/models/player/blender_scripts/xon_player_model_action_remover.py index 21e162a..561cdbe 100644 --- a/models/player/blender_scripts/xon_player_model_action_remover.py +++ b/models/player/blender_scripts/xon_player_model_action_remover.py @@ -10,11 +10,27 @@ def removeAction(name): try: bpy.data.actions.remove(bpy.data.actions[name]) except: - print(f"WARNING: This action called <{name}> does not exist!") + print("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"] +actionNames = [ + "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]) +for i in range(len(actionNames)): + removeAction(actionNames[i]) print("ALL XONOTIC PLAYER ANIMATION ACTIONS REMOVED!") \ No newline at end of file -- 2.39.2