pgtools 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +25 -25
- data/bin/bxm_decoder +2 -2
- data/bin/bxm_encoder +2 -2
- data/bin/clh_convert +2 -2
- data/bin/clp_convert +2 -2
- data/bin/clw_convert +2 -2
- data/bin/dat_creator +2 -2
- data/bin/dat_extractor +2 -2
- data/bin/dat_ls +2 -2
- data/bin/eff_idd_creator +2 -2
- data/bin/eff_idd_extractor +2 -2
- data/bin/exp_convert_wiiu_pc +2 -2
- data/bin/exp_tool +2 -2
- data/bin/mot_convert_wiiu_pc +2 -2
- data/bin/mot_tool +2 -2
- data/bin/pkz_extractor +2 -2
- data/bin/scr_creator +2 -2
- data/bin/scr_extractor +2 -2
- data/bin/wmb_cleanup +2 -2
- data/bin/wmb_common_bones +2 -2
- data/bin/wmb_convert_pc_switch +2 -2
- data/bin/wmb_convert_wiiu_pc +2 -2
- data/bin/wmb_export_assimp +2 -2
- data/bin/wmb_get_bone_map +2 -2
- data/bin/wmb_import_assimp +2 -2
- data/bin/wmb_import_nier +2 -2
- data/bin/wmb_import_wiiu +2 -2
- data/bin/wtb_convert_wiiu_pc +2 -2
- data/bin/wtx_creator +2 -2
- data/bin/wtx_extractor +2 -2
- data/lib/bayonetta/alignment.rb +0 -0
- data/lib/bayonetta/bone.rb +0 -0
- data/lib/bayonetta/bxm.rb +180 -180
- data/lib/bayonetta/clh.rb +159 -159
- data/lib/bayonetta/clp.rb +212 -212
- data/lib/bayonetta/clw.rb +166 -166
- data/lib/bayonetta/dat.rb +261 -261
- data/lib/bayonetta/eff.rb +314 -314
- data/lib/bayonetta/endianness.rb +0 -0
- data/lib/bayonetta/exp.rb +768 -768
- data/lib/bayonetta/linalg.rb +416 -416
- data/lib/bayonetta/material_database.yaml +2581 -2581
- data/lib/bayonetta/mot.rb +763 -763
- data/lib/bayonetta/pkz.rb +63 -63
- data/lib/bayonetta/scr.rb +0 -0
- data/lib/bayonetta/tools/bxm_decoder.rb +23 -23
- data/lib/bayonetta/tools/bxm_encoder.rb +37 -37
- data/lib/bayonetta/tools/clh_convert.rb +60 -60
- data/lib/bayonetta/tools/clp_convert.rb +70 -70
- data/lib/bayonetta/tools/clw_convert.rb +60 -60
- data/lib/bayonetta/tools/dat_creator.rb +57 -57
- data/lib/bayonetta/tools/dat_extractor.rb +94 -94
- data/lib/bayonetta/tools/dat_ls.rb +106 -106
- data/lib/bayonetta/tools/eff_idd_creator.rb +66 -66
- data/lib/bayonetta/tools/eff_idd_extractor.rb +73 -73
- data/lib/bayonetta/tools/exp_convert_wiiu_pc.rb +33 -33
- data/lib/bayonetta/tools/exp_tool.rb +48 -48
- data/lib/bayonetta/tools/mot_convert_wiiu_pc.rb +33 -33
- data/lib/bayonetta/tools/mot_tool.rb +0 -0
- data/lib/bayonetta/tools/pkz_extractor.rb +75 -75
- data/lib/bayonetta/tools/scr_creator.rb +63 -63
- data/lib/bayonetta/tools/scr_extractor.rb +78 -78
- data/lib/bayonetta/tools/wmb_cleanup.rb +250 -250
- data/lib/bayonetta/tools/wmb_common_bones.rb +45 -45
- data/lib/bayonetta/tools/wmb_convert_pc_switch.rb +35 -35
- data/lib/bayonetta/tools/wmb_convert_wiiu_pc.rb +33 -33
- data/lib/bayonetta/tools/wmb_export_assimp.rb +479 -479
- data/lib/bayonetta/tools/wmb_get_bone_map.rb +50 -50
- data/lib/bayonetta/tools/wmb_import_assimp.rb +735 -735
- data/lib/bayonetta/tools/wmb_import_geometry_wiiu_pc.rb +472 -472
- data/lib/bayonetta/tools/wmb_import_nier.rb +309 -309
- data/lib/bayonetta/tools/wtb_convert_wiiu_pc.rb +95 -95
- data/lib/bayonetta/tools/wtb_import_textures.rb +103 -103
- data/lib/bayonetta/tools/wtx_creator.rb +69 -69
- data/lib/bayonetta/tools/wtx_extractor.rb +85 -85
- data/lib/bayonetta/vertex_types.yaml +0 -0
- data/lib/bayonetta/vertex_types2.yaml +0 -0
- data/lib/bayonetta/vertex_types_nier.yaml +145 -145
- data/lib/bayonetta/wmb.rb +2455 -2443
- data/lib/bayonetta/wmb3.rb +759 -759
- data/lib/bayonetta/wtb.rb +481 -481
- data/lib/bayonetta.rb +60 -60
- metadata +2 -2
@@ -1,45 +1,45 @@
|
|
1
|
-
require 'set'
|
2
|
-
require 'yaml'
|
3
|
-
require 'optparse'
|
4
|
-
require_relative '../../bayonetta'
|
5
|
-
include Bayonetta
|
6
|
-
|
7
|
-
OptionParser.new do |opts|
|
8
|
-
opts.banner = <<EOF
|
9
|
-
Usage: wmb_common_bones target_file [target_file2 ...]
|
10
|
-
This script finds the common bones between a list of models.
|
11
|
-
This was used to find the minimal skeleton.
|
12
|
-
Target files should be dat files or wmb files.
|
13
|
-
EOF
|
14
|
-
opts.on("-h", "--help", "Prints this help") do
|
15
|
-
puts opts
|
16
|
-
exit
|
17
|
-
end
|
18
|
-
|
19
|
-
end.parse!
|
20
|
-
|
21
|
-
bone_set = Set::new
|
22
|
-
bone_set.merge((0..0xfff).to_a)
|
23
|
-
found = false
|
24
|
-
ARGV.each { |input_file|
|
25
|
-
raise "Invalid file #{input_file}" unless File::file?(input_file)
|
26
|
-
if File.extname(input_file) == ".dat"
|
27
|
-
search = File.basename(input_file, ".dat")+".wmb"
|
28
|
-
wmb = DATFile::load(input_file).each.select { |name, f|
|
29
|
-
name == search
|
30
|
-
}.first
|
31
|
-
if !wmb
|
32
|
-
warn "Could not find #{search} in #{File.basename(input_file)}"
|
33
|
-
next
|
34
|
-
end
|
35
|
-
wmb = wmb[1]
|
36
|
-
wmb = WMBFile::load(wmb)
|
37
|
-
else
|
38
|
-
wmb = WMBFile::load(input_file)
|
39
|
-
end
|
40
|
-
found = true
|
41
|
-
tt = wmb.bone_index_translate_table.table
|
42
|
-
bone_set &= tt.collect{ |mot_index, bone_index| mot_index }
|
43
|
-
}
|
44
|
-
|
45
|
-
puts YAML::dump(bone_set.to_a) if found
|
1
|
+
require 'set'
|
2
|
+
require 'yaml'
|
3
|
+
require 'optparse'
|
4
|
+
require_relative '../../bayonetta'
|
5
|
+
include Bayonetta
|
6
|
+
|
7
|
+
OptionParser.new do |opts|
|
8
|
+
opts.banner = <<EOF
|
9
|
+
Usage: wmb_common_bones target_file [target_file2 ...]
|
10
|
+
This script finds the common bones between a list of models.
|
11
|
+
This was used to find the minimal skeleton.
|
12
|
+
Target files should be dat files or wmb files.
|
13
|
+
EOF
|
14
|
+
opts.on("-h", "--help", "Prints this help") do
|
15
|
+
puts opts
|
16
|
+
exit
|
17
|
+
end
|
18
|
+
|
19
|
+
end.parse!
|
20
|
+
|
21
|
+
bone_set = Set::new
|
22
|
+
bone_set.merge((0..0xfff).to_a)
|
23
|
+
found = false
|
24
|
+
ARGV.each { |input_file|
|
25
|
+
raise "Invalid file #{input_file}" unless File::file?(input_file)
|
26
|
+
if File.extname(input_file) == ".dat"
|
27
|
+
search = File.basename(input_file, ".dat")+".wmb"
|
28
|
+
wmb = DATFile::load(input_file).each.select { |name, f|
|
29
|
+
name == search
|
30
|
+
}.first
|
31
|
+
if !wmb
|
32
|
+
warn "Could not find #{search} in #{File.basename(input_file)}"
|
33
|
+
next
|
34
|
+
end
|
35
|
+
wmb = wmb[1]
|
36
|
+
wmb = WMBFile::load(wmb)
|
37
|
+
else
|
38
|
+
wmb = WMBFile::load(input_file)
|
39
|
+
end
|
40
|
+
found = true
|
41
|
+
tt = wmb.bone_index_translate_table.table
|
42
|
+
bone_set &= tt.collect{ |mot_index, bone_index| mot_index }
|
43
|
+
}
|
44
|
+
|
45
|
+
puts YAML::dump(bone_set.to_a) if found
|
@@ -1,35 +1,35 @@
|
|
1
|
-
require 'optparse'
|
2
|
-
require_relative '../../bayonetta.rb'
|
3
|
-
include Bayonetta
|
4
|
-
|
5
|
-
$options = {
|
6
|
-
output: nil
|
7
|
-
}
|
8
|
-
|
9
|
-
OptionParser.new do |opts|
|
10
|
-
opts.banner = <<EOF
|
11
|
-
Usage: wmb_convert_pc_switch target_file
|
12
|
-
EOF
|
13
|
-
opts.on("-h", "--help", "Prints this help") do
|
14
|
-
puts opts
|
15
|
-
exit
|
16
|
-
end
|
17
|
-
|
18
|
-
opts.on("-o", "--output=filename", "file to output result") do |name|
|
19
|
-
$options[:output] = name
|
20
|
-
end
|
21
|
-
|
22
|
-
end.parse!
|
23
|
-
|
24
|
-
input_file = ARGV[0]
|
25
|
-
|
26
|
-
raise "Invalid file #{input_file}" unless input_file && File::file?(input_file)
|
27
|
-
wmb = WMBFile::load(input_file)
|
28
|
-
wmb.normals_to_wide
|
29
|
-
|
30
|
-
output_file = $options[:output]
|
31
|
-
if !output_file
|
32
|
-
Dir.mkdir("wmb_output") unless Dir.exist?("wmb_output")
|
33
|
-
output_file = File.join("wmb_output", File.basename(input_file))
|
34
|
-
end
|
35
|
-
wmb.dump(output_file, wmb.was_big?)
|
1
|
+
require 'optparse'
|
2
|
+
require_relative '../../bayonetta.rb'
|
3
|
+
include Bayonetta
|
4
|
+
|
5
|
+
$options = {
|
6
|
+
output: nil
|
7
|
+
}
|
8
|
+
|
9
|
+
OptionParser.new do |opts|
|
10
|
+
opts.banner = <<EOF
|
11
|
+
Usage: wmb_convert_pc_switch target_file
|
12
|
+
EOF
|
13
|
+
opts.on("-h", "--help", "Prints this help") do
|
14
|
+
puts opts
|
15
|
+
exit
|
16
|
+
end
|
17
|
+
|
18
|
+
opts.on("-o", "--output=filename", "file to output result") do |name|
|
19
|
+
$options[:output] = name
|
20
|
+
end
|
21
|
+
|
22
|
+
end.parse!
|
23
|
+
|
24
|
+
input_file = ARGV[0]
|
25
|
+
|
26
|
+
raise "Invalid file #{input_file}" unless input_file && File::file?(input_file)
|
27
|
+
wmb = WMBFile::load(input_file)
|
28
|
+
wmb.normals_to_wide
|
29
|
+
|
30
|
+
output_file = $options[:output]
|
31
|
+
if !output_file
|
32
|
+
Dir.mkdir("wmb_output") unless Dir.exist?("wmb_output")
|
33
|
+
output_file = File.join("wmb_output", File.basename(input_file))
|
34
|
+
end
|
35
|
+
wmb.dump(output_file, wmb.was_big?)
|
@@ -1,33 +1,33 @@
|
|
1
|
-
require 'optparse'
|
2
|
-
require_relative '../../bayonetta'
|
3
|
-
include Bayonetta
|
4
|
-
|
5
|
-
$options = {
|
6
|
-
output: nil
|
7
|
-
}
|
8
|
-
|
9
|
-
OptionParser.new do |opts|
|
10
|
-
opts.banner = <<EOF
|
11
|
-
Usage: wmb_convert_wiiu_pc target_file
|
12
|
-
EOF
|
13
|
-
opts.on("-h", "--help", "Prints this help") do
|
14
|
-
puts opts
|
15
|
-
exit
|
16
|
-
end
|
17
|
-
|
18
|
-
opts.on("-o", "--output=filename", "file to output result") do |name|
|
19
|
-
$options[:output] = name
|
20
|
-
end
|
21
|
-
|
22
|
-
end.parse!
|
23
|
-
|
24
|
-
input_file = ARGV[0]
|
25
|
-
|
26
|
-
raise "Invalid file #{input_file}" unless input_file && File::file?(input_file)
|
27
|
-
|
28
|
-
output_file = $options[:output]
|
29
|
-
if !output_file
|
30
|
-
Dir.mkdir("wmb_output") unless Dir.exist?("wmb_output")
|
31
|
-
output_file = File.join("wmb_output", File.basename(input_file))
|
32
|
-
end
|
33
|
-
WMBFile::convert(input_file, output_file)
|
1
|
+
require 'optparse'
|
2
|
+
require_relative '../../bayonetta'
|
3
|
+
include Bayonetta
|
4
|
+
|
5
|
+
$options = {
|
6
|
+
output: nil
|
7
|
+
}
|
8
|
+
|
9
|
+
OptionParser.new do |opts|
|
10
|
+
opts.banner = <<EOF
|
11
|
+
Usage: wmb_convert_wiiu_pc target_file
|
12
|
+
EOF
|
13
|
+
opts.on("-h", "--help", "Prints this help") do
|
14
|
+
puts opts
|
15
|
+
exit
|
16
|
+
end
|
17
|
+
|
18
|
+
opts.on("-o", "--output=filename", "file to output result") do |name|
|
19
|
+
$options[:output] = name
|
20
|
+
end
|
21
|
+
|
22
|
+
end.parse!
|
23
|
+
|
24
|
+
input_file = ARGV[0]
|
25
|
+
|
26
|
+
raise "Invalid file #{input_file}" unless input_file && File::file?(input_file)
|
27
|
+
|
28
|
+
output_file = $options[:output]
|
29
|
+
if !output_file
|
30
|
+
Dir.mkdir("wmb_output") unless Dir.exist?("wmb_output")
|
31
|
+
output_file = File.join("wmb_output", File.basename(input_file))
|
32
|
+
end
|
33
|
+
WMBFile::convert(input_file, output_file)
|