fix add_floor material error

This commit is contained in:
yyc12345 2020-11-07 19:32:07 +08:00
parent 3d1cf14334
commit 031458bfc8
3 changed files with 60 additions and 52 deletions

View File

@ -206,9 +206,9 @@ def create_or_get_material(material_name):
# write custom property
# WARNING: this data is shared with BallanceVirtoolsPlugin - mapping_BM.cpp - fix_blender_texture
m['virtools-ambient'] = (0.0, 0.0, 0.0)
m['virtools-diffuse'] = (122 / 255.0, 122 / 255.0, 122 / 255.0) if material_name == 'FloorSide' else (1.0, 1.0, 1.0)
m['virtools-specular'] = (0.0, 0.0, 0.0) if material_name == 'FloorSide' else (80 / 255.0, 80 / 255.0, 80 / 255.0)
m['virtools-emissive'] = (104 / 255.0, 104 / 255.0, 104 / 255.0) if material_name == 'FloorSide' else (0.0, 0.0, 0.0)
m['virtools-diffuse'] = (122 / 255.0, 122 / 255.0, 122 / 255.0) if material_name in config.floor_side_material_list else (1.0, 1.0, 1.0)
m['virtools-specular'] = (0.0, 0.0, 0.0) if material_name in config.floor_side_material_list else (80 / 255.0, 80 / 255.0, 80 / 255.0)
m['virtools-emissive'] = (104 / 255.0, 104 / 255.0, 104 / 255.0) if material_name in config.floor_side_material_list else (0.0, 0.0, 0.0)
m['virtools-power'] = 0.0
return m

View File

@ -146,7 +146,9 @@ floor_expand_direction_map = {
floor_texture_corresponding_map = {
"FloorSide": "Floor_Side.bmp",
"FloorTopBorder": "Floor_Top_Border.bmp",
"FloorTopBorder_ForSide": "Floor_Top_Border.bmp",
"FloorTopBorderless": "Floor_Top_Borderless.bmp",
"FloorTopBorderless_ForSide": "Floor_Top_Borderless.bmp",
"FloorTopFlat": "Floor_Top_Flat.bmp",
"FloorTopProfil": "Floor_Top_Profil.bmp",
"FloorTopProfilFlat": "Floor_Top_ProfilFlat.bmp",
@ -155,6 +157,12 @@ floor_texture_corresponding_map = {
"BallStone": "Ball_Stone.bmp"
}
floor_side_material_list = [
"FloorSide",
"FloorTopBorder_ForSide",
"FloorTopBorderless_ForSide"
]
floor_block_dict = {}
floor_basic_block_list = []
floor_derived_block_list = []

View File

@ -57,7 +57,7 @@
"P2": 2,
"P3": 1,
"P4": 0,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -81,7 +81,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -105,7 +105,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -129,7 +129,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -186,7 +186,7 @@
"P2": 3,
"P3": 4,
"P4": 5,
"Textures": "FloorTopBorder"
"Textures": "FloorTopBorder_ForSide"
},
{
"Type": "RECTANGLE",
@ -194,7 +194,7 @@
"P2": 2,
"P3": 1,
"P4": 0,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
}
@ -257,7 +257,7 @@
"P2": 2,
"P3": 1,
"P4": 0,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -281,7 +281,7 @@
"P2": 2,
"P3": 1,
"P4": 0,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -305,7 +305,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -329,7 +329,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -386,7 +386,7 @@
"P2": 3,
"P3": 4,
"P4": 5,
"Textures": "FloorTopBorder"
"Textures": "FloorTopBorder_ForSide"
},
{
"Type": "RECTANGLE",
@ -394,7 +394,7 @@
"P2": 2,
"P3": 1,
"P4": 0,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
}
@ -465,7 +465,7 @@
"P2": 2,
"P3": 1,
"P4": 0,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -513,7 +513,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -537,7 +537,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -591,7 +591,7 @@
"P2": 3,
"P3": 4,
"P4": 5,
"Textures": "FloorTopBorder"
"Textures": "FloorTopBorder_ForSide"
},
{
"Type": "RECTANGLE",
@ -599,7 +599,7 @@
"P2": 2,
"P3": 1,
"P4": 0,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -631,7 +631,7 @@
"P2": 3,
"P3": 4,
"P4": 5,
"Textures": "FloorTopBorder"
"Textures": "FloorTopBorder_ForSide"
},
{
"Type": "RECTANGLE",
@ -639,7 +639,7 @@
"P2": 2,
"P3": 1,
"P4": 0,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
}
@ -710,7 +710,7 @@
"P2": 2,
"P3": 1,
"P4": 0,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -758,7 +758,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -782,7 +782,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -836,7 +836,7 @@
"P2": 3,
"P3": 4,
"P4": 5,
"Textures": "FloorTopBorder"
"Textures": "FloorTopBorder_ForSide"
},
{
"Type": "RECTANGLE",
@ -844,7 +844,7 @@
"P2": 2,
"P3": 1,
"P4": 0,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -876,7 +876,7 @@
"P2": 3,
"P3": 4,
"P4": 5,
"Textures": "FloorTopBorder"
"Textures": "FloorTopBorder_ForSide"
},
{
"Type": "RECTANGLE",
@ -884,7 +884,7 @@
"P2": 2,
"P3": 1,
"P4": 0,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
}
@ -955,7 +955,7 @@
"P2": 2,
"P3": 1,
"P4": 0,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -979,7 +979,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -1003,7 +1003,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -1027,7 +1027,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -1051,7 +1051,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -1126,7 +1126,7 @@
"P2": 2,
"P3": 1,
"P4": 0,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -1150,7 +1150,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -1174,7 +1174,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -1198,7 +1198,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -1222,7 +1222,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -1289,7 +1289,7 @@
"P2": 2,
"P3": 1,
"P4": 0,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -1313,7 +1313,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -1337,7 +1337,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -1361,7 +1361,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -1385,7 +1385,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -2236,7 +2236,7 @@
"P2": 2,
"P3": 1,
"P4": 0,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -2266,7 +2266,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
},
{
"Type": "RECTANGLE",
@ -2274,7 +2274,7 @@
"P2": 4,
"P3": 3,
"P4": 2,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -2322,7 +2322,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -2377,7 +2377,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorder"
"Textures": "FloorTopBorder_ForSide"
},
{
"Type": "RECTANGLE",
@ -2385,7 +2385,7 @@
"P2": 4,
"P3": 3,
"P4": 2,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
},
@ -2416,7 +2416,7 @@
"P2": 2,
"P3": 1,
"P4": 0,
"Textures": "FloorTopBorder"
"Textures": "FloorTopBorder_ForSide"
},
{
"Type": "RECTANGLE",
@ -2424,7 +2424,7 @@
"P2": 3,
"P3": 4,
"P4": 5,
"Textures": "FloorTopBorderless"
"Textures": "FloorTopBorderless_ForSide"
}
]
}