From: LegendaryGuard Date: Wed, 7 Dec 2022 13:16:58 +0000 (+0100) Subject: Fix print exception and refactor array variable in the action remover script X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0ca4d5ed12bdcd3404432820e8f92b7149722322;p=xonotic%2Fmediasource.git Fix print exception and refactor array variable in the action remover script --- 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