summaryrefslogtreecommitdiffstats
path: root/game/build/tools/rename_anim.pl
diff options
context:
space:
mode:
authorSvxy <aidan61605@gmail.com>2023-05-31 23:31:32 +0200
committerSvxy <aidan61605@gmail.com>2023-05-31 23:31:32 +0200
commiteb4b3404aa00220d659e532151dab13d642c17a3 (patch)
tree7e1107c4995489a26c4007e41b53ea8d00ab2134 /game/build/tools/rename_anim.pl
downloadThe-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.gz
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.bz2
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.lz
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.xz
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.zst
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.zip
Diffstat (limited to 'game/build/tools/rename_anim.pl')
-rw-r--r--game/build/tools/rename_anim.pl17
1 files changed, 17 insertions, 0 deletions
diff --git a/game/build/tools/rename_anim.pl b/game/build/tools/rename_anim.pl
new file mode 100644
index 0000000..fc3b802
--- /dev/null
+++ b/game/build/tools/rename_anim.pl
@@ -0,0 +1,17 @@
+opendir ( DIR, "." ) or die "Couldn't open directory, $!";
+
+$ChunkName = $ARGV[0];
+$ChunkId = $ARGV[1];
+
+while ( $file = readdir DIR )
+{
+ if ( $file =~ m/(.*).p3d/ )
+ {
+ $/ = ".p3d";
+ chomp( $file );
+
+ `p3dmutate -m $ChunkName -i $ChunkId -f "Name" -a $file $file.p3d 1>&2`
+ }
+}
+
+close DIR \ No newline at end of file