Skip to content

Commit

Permalink
Updated to Unity 2018.2. Fixed a bug that would cause models with a f…
Browse files Browse the repository at this point in the history
…ourth UV set to be exported incorrectly. Updated dictionaries.
  • Loading branch information
BobDoleOwndU committed Aug 5, 2018
1 parent 701825a commit 2c03770
Show file tree
Hide file tree
Showing 7 changed files with 188 additions and 7 deletions.
7 changes: 5 additions & 2 deletions FMDL-Studio-v2/Assets/Fmdl Studio/Scripts/Classes/Fmdl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1413,6 +1413,9 @@ private void GetFmdlData(GameObject gameObject)
FmdlBoneGroup fmdlBoneGroup = new FmdlBoneGroup();
int meshBoneCount = meshes[i].bones.Length;

if (meshBoneCount > 32)
throw new Exception("A mesh cannot be weighted to more than 32 bones!");

fmdlBoneGroup.unknown0 = 4;
fmdlBoneGroup.boneIndexCount = (ushort)meshBoneCount;
fmdlBoneGroup.boneIndices = new ushort[meshBoneCount];
Expand Down Expand Up @@ -1729,7 +1732,7 @@ private void GetFmdlData(GameObject gameObject)
vertexOffset += 4;

fmdlMeshFormat4.vertexFormatCount++;
fmdlMeshFormat4.length += 4;
meshFormatLength += 4;
} //if

//Can't implement this. Unity doesn't support it.
Expand Down Expand Up @@ -1764,7 +1767,7 @@ private void GetFmdlData(GameObject gameObject)
fmdlMeshFormat4.length = meshFormatLength;

meshFormats.Add(fmdlMeshFormat2);
if (fmdlMeshFormat3.length > 0)
if (fmdlMeshFormat3.vertexFormatCount > 0)
{
meshFormats.Add(fmdlMeshFormat3);
fmdlMeshFormatInfo.meshFormatCount++;
Expand Down
140 changes: 140 additions & 0 deletions FMDL-Studio-v2/Assets/Fmdl Studio/fmdl_dictionary.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

__iron_f
_glass_a2
_gntn_hndr001
_iron_c_nr
aaa
aaa_foxShader_1
aaa_glass
Expand All @@ -21,6 +23,7 @@ adobe_b1_copy1
adobe_b2
adobe_b3
adobe_b5
afgh_afgh_fctr004_i1
afgh_ambx001_bx
afgh_ambx001_bx1
afgh_antn001
Expand Down Expand Up @@ -260,6 +263,7 @@ afgh_clth008
afgh_clth008_vrtn001
afgh_clth009_ca
afgh_clth017
afgh_cm_afgh_fctr001_i1
afgh_cmmn002
afgh_cmmn002_1
afgh_cmmn002_1_copy
Expand Down Expand Up @@ -793,6 +797,7 @@ afgh_tnwl002_copy
afgh_tool001
afgh_trck001_aa
afgh_trck001_ad
afgh_tree010_1
afgh_tree015
afgh_tree015_v1_1
afgh_tree015_v2
Expand Down Expand Up @@ -1893,6 +1898,7 @@ cm_mafr_dc_dirt002_copy
cm_mafr_dc_dirt003
cm_mafr_dc_dirt003_03
cm_mafr_dc_grbg003
cm_mafr_dc_mudd007_01
cm_mafr_dc_pddl001
cm_mafr_dc_pddl002
cm_mafr_dc_soil001
Expand Down Expand Up @@ -2623,6 +2629,7 @@ conc_c1
conc_c5
conc1m
constant
copper_a
cotton
cotton_a
cotton_a1
Expand Down Expand Up @@ -3954,6 +3961,7 @@ gntn_tree001
gntn_tree003_mg
gntn_tree003_v1
gntn_trsh001_1
gntn_trsh001_v2_1
gntn_tubb001
gntn_wall001_dr_
gntn_wall001_dr__copy
Expand Down Expand Up @@ -4186,6 +4194,7 @@ leaf_a_shadow
leaf_b
leaf_b_cm_mafr_grss001
leaf_b_cm_mafr_grss001_v1
leaf_plane_foxShader_0
leaf_trans_a
leaf_trans_a_mafr_tree032
leaf_trans_a_vrtn002_lod0
Expand Down Expand Up @@ -4287,6 +4296,7 @@ mafr_brdg009_001
mafr_brrc001
mafr_brrc002
mafr_brrl001
mafr_brrl001_barl01
mafr_bttl002
mafr_buld003
mafr_buld003_fl
Expand Down Expand Up @@ -4772,6 +4782,7 @@ mafr_ston002_a5
mafr_ston002_a6
mafr_ston003
mafr_sttw001
mafr_sttw002_fr_copy
mafr_sttw002_tw
mafr_swtc001
mafr_swtc001_8
Expand Down Expand Up @@ -14468,6 +14479,7 @@ MESH_ssda_clod007_vrtn002
MESH_ssda_clth008
MESH_ssda_cmmn002_desk001
MESH_ssda_cmmn002_vrtn002
MESH_ssda_crys001
MESH_ssda_crys001_crto001
MESH_ssda_crys001_vrtn003
MESH_ssda_dcmt001
Expand Down Expand Up @@ -14760,6 +14772,7 @@ MESH_ssde_wepn003_vrtn001
MESH_ssde_wepn003_vrtn002
MESH_ssde_wepn003_vrtn003
MESH_ssdg_clth001_vrtn001
MESH_ssdm_tile001
MESH_stage
MESH_STAND
MESH_STAND_A
Expand Down Expand Up @@ -15150,6 +15163,7 @@ mtbs_flot001
mtbs_flot001_rp
mtbs_frlf002
mtbs_frlf002_1
mtbs_gate001_va_CV
mtbs_gate003_1
mtbs_glas001
mtbs_glas001_ga
Expand Down Expand Up @@ -15309,6 +15323,7 @@ mtbs_stat001
mtbs_stat001_tx
mtbs_stfr006
mtbs_stfr006_dg_NC
mtbs_stfr006_dk_NCm
mtbs_stfr006_gr_NC
mtbs_stfr006_NC
mtbs_stpl002
Expand Down Expand Up @@ -15479,34 +15494,135 @@ paper_b1
paper_b2
parts_dcl
parts_msk
pasted__adobe_b_copy1
pasted__afgh_bnch002_
pasted__afgh_ctwk001_fr
pasted__afgh_ctwk001_ip
pasted__afgh_flwr002_srbn001
pasted__afgh_pddl001_ri
pasted__afgh_sand002
pasted__afgh_stfr002_m3_NC
pasted__alminium_b
pasted__asphalt_a
pasted__basic
pasted__cm_afgh_burn_
pasted__cm_afgh_clff002_v4
pasted__cm_afgh_clff002_v5
pasted__cm_afgh_cncr003
pasted__cm_afgh_cncr003_bsm_alp
pasted__cm_afgh_cncr003_bsm_alp1
pasted__cm_afgh_cncr003_v3
pasted__cm_afgh_nett002
pasted__cm_afgh_wall036_d7
pasted__cm_afgh_wall046_d1
pasted__cm_cypr_grss001_v1
pasted__cm_cypr_mchn001
pasted__cm_gntn_fenc003_iron_f1
pasted__cm_gntn_htch001
pasted__cm_gntn_pipe001
pasted__cm_gntn_star001
pasted__cm_mafr_cncr001_d1
pasted__cm_mafr_cncr001_d2
pasted__cm_mafr_cncr001_d4
pasted__cm_mafr_crck002
pasted__cm_mafr_dc_dirt002_bl_copy
pasted__cm_mafr_dc_soil001
pasted__cm_mafr_grnd004
pasted__cm_mafr_mudd002_v1_1
pasted__cm_mafr_pipe002
pasted__cm_mafr_strw002
pasted__cm_mafr_tmbr004
pasted__cm_mafr_tnrf004
pasted__cm_mtbs_ctwk002
pasted__cm_mtbs_ctwk002_NC
pasted__cm_mtbs_ctwk004_vb
pasted__cm_mtbs_ctwk004_vc
pasted__cm_mtbs_hndr002_va_CV
pasted__cm_mtbs_wall019_vb_CV
pasted__cm_ssda_sand001_v2
pasted__cm_ssda_wall050
pasted__conc_a4
pasted__cypr_char003
pasted__cypr_desk001
pasted__cypr_desk001_01
pasted__cypr_shlf001
pasted__fabric_low_glossy2
pasted__foxShader_0
pasted__foxShader_1
pasted__foxShader_24
pasted__glass1
pasted__glass1_copy
pasted__glass1_copy1
pasted__gntn_cage001
pasted__gntn_pipe008_or
pasted__gntn_pipe008_vb
pasted__iron_b_nr
pasted__iron_b2
pasted__iron_c
pasted__iron_f
pasted__iron_f_nc2
pasted__iron_f1
pasted__iron_f3
pasted__iron_j
pasted__iron_l
pasted__leaf_trans_b
pasted__leaf_trans_b_v7
pasted__leaf_trans_b1
pasted__leaf_trans_b2
pasted__leaf_trans_b3
pasted__lght003_dr
pasted__mafr_brdg002
pasted__mafr_clff029_v0
pasted__mafr_grss016_v1
pasted__mafr_pipe009_v5
pasted__mafr_room001_dw
pasted__mafr_room001_rf
pasted__mafr_star001
pasted__mafr_tank004
pasted__mafr_tnwl003
pasted__mafr_tnwl003_ir
pasted__mafr_tree036_ed
pasted__mafr_tree036_rp
pasted__mafr_tree036_vr
pasted__mgoa_fndt004_fenc008
pasted__mgoa_tree003
pasted__mortar_a
pasted__mtbs_btty001
pasted__mtbs_pipe009
pasted__pasted__afgh_ctwk001_ip
pasted__pasted__cm_afgh_wall046_d1
pasted__pasted__cm_mtbs_wall019_vb_CV
pasted__pasted__cm_ssda_sand001_v2
pasted__pasted__conc_a1
pasted__pasted__cotton_a
pasted__pasted__cypr_desk001
pasted__pasted__cypr_desk001_01
pasted__pasted__fabric_low_glossy2
pasted__pasted__iron_f2
pasted__pasted__mafr_room001_dw1
pasted__pasted__mafr_room001_wd_alp
pasted__pasted__pasted__leaf_trans_b3
pasted__pasted__pasted__mafr_room001_dw
pasted__pasted__pasted__wood_c2
pasted__pasted__rubber_a1
pasted__pasted__rubber_a1_multi
pasted__pasted__wood_c1
pasted__plastic_a
pasted__plastic_b
pasted__pvc_a
pasted__pvc_a1
pasted__pvc_a3
pasted__rock_a1
pasted__rock_b1
pasted__soil_a
pasted__ssda_crys001
pasted__ssda_dish006
pasted__ssde_fenc007
pasted__ssde_mchn001
pasted__tree_a1
pasted__tree_a2
pasted__wood_c
pasted__wood_c1
paz0_blood_anim_a
paz0_blood_anim_a1
paz0_blood_anim_b
Expand Down Expand Up @@ -15702,6 +15818,7 @@ shield
Shift_Tex_LIN
short
sight
silver_a
skin
skin_a3
skin_a4
Expand Down Expand Up @@ -15822,6 +15939,8 @@ SKL_000_SLING
SKL_000_smpl_sklt001
SKL_000_SPINE
SKL_000_tent001_vrtn001
SKL_000_tlet000
SKL_000_trsh000
SKL_000_WAIST
SKL_001
SKL_001_A
Expand Down Expand Up @@ -15977,9 +16096,11 @@ SKL_001_SWINGSIDE
SKL_001_SWITCH
SKL_001_tent001_vrtn001
SKL_001_TIP
SKL_001_tlet000
SKL_001_TOPCOVER
SKL_001_TOPCOVER_ROT
SKL_001_TRIGGER
SKL_001_trsh000
SKL_001_TUBE
SKL_001_TUBE1
SKL_001_TURRET
Expand Down Expand Up @@ -19924,6 +20045,10 @@ spl_mtbs_uq0030
spl_mtbs_uq0040
spl_mtbs_uq0040_NC
spl_mtbs_uq0070
ssda_brck001
ssda_cabl001
ssda_clod001
ssda_clth008
ssda_crys001
ssda_crys002_b3
ssda_crys002_b4
Expand Down Expand Up @@ -19971,6 +20096,9 @@ ssda_crys002_vi
ssda_crys002_vj
ssda_crys002_vk
ssda_crys002_vl
ssda_dcmt002
ssda_dish006
ssda_gate006
ssda_grbg002
ssda_grbg002_v3
ssda_grbg002_v8
Expand All @@ -19982,6 +20110,17 @@ ssda_grbg002_vg
ssda_grbg002_vh
ssda_grbg002_vj
ssda_grbg002_vk
ssda_grnd003
ssda_hous022
ssda_hutt008
ssda_mttr001
ssda_rbbl003
ssda_rbbl014
ssda_shlf007
ssda_shtt001
ssda_shtt001_vrtn001
ssda_sttw001
ssda_tank007
ssde_antn001
ssde_antn001_fr
ssde_antn001_fr_NC
Expand Down Expand Up @@ -20255,6 +20394,7 @@ URepeat_SubNorm_UV
URepeat_UV
URepeatMetalic_UV
URepeatMetalicAlpha_UV
urethane_coat_a_nr
UShift_ScreenTex
UShift_UV
UShiftBL_UV
Expand Down
3 changes: 3 additions & 0 deletions FMDL-Studio-v2/Assets/Fmdl Studio/qar_dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44066,6 +44066,7 @@
/Assets/tpp/pack/player/motion/player2_facial_ddf_helispace
/Assets/tpp/pack/player/motion/player2_facial_ddm_helispace
/Assets/tpp/pack/player/motion/player2_facial_ocelot
/Assets/tpp/pack/player/motion/player2_facial_quiet
/Assets/tpp/pack/player/motion/player2_facial_snake
/Assets/tpp/pack/player/motion/player2_facial_snake_helispace
/Assets/tpp/pack/player/motion/player2_location_motion
Expand Down Expand Up @@ -44115,6 +44116,7 @@
/Assets/tpp/pack/player/parts/plparts_normal_scarf
/Assets/tpp/pack/player/parts/plparts_ocelot
/Assets/tpp/pack/player/parts/plparts_parasite
/Assets/tpp/pack/player/parts/plparts_quiet
/Assets/tpp/pack/player/parts/plparts_rai0_main0_def_v00
/Assets/tpp/pack/player/parts/plparts_raiden
/Assets/tpp/pack/player/parts/plparts_silver
Expand Down Expand Up @@ -44961,6 +44963,7 @@
/Assets/tpp/sound/asset/common_bank_01_add02
/Assets/tpp/sound/asset/cutscene_common
/Assets/tpp/sound/asset/cypr_title
/Assets/tpp/sound/asset/day1080_fob_add
/Assets/tpp/sound/asset/env_afgh_common
/Assets/tpp/sound/asset/env_afgh_location
/Assets/tpp/sound/asset/env_common
Expand Down
Loading

0 comments on commit 2c03770

Please sign in to comment.