@@ -253,7 +253,7 @@ def createBlenderSpawnPoint(self, spawnPointData):
253253 #TODO: implement spawn type name lookup
254254 ob = bpy .data .objects .new (f"SpawnPoint_{ spawnPointData .type } " , None )
255255 ob .empty_display_type = "ARROWS"
256- ob .empty_display_size = 100
256+ ob .empty_display_size = 100 # The map will be at 100x scale so it's a good idea to match that here
257257 ob .location = spawnPointData .position
258258 ob .rotation_mode = "XYZ"
259259 ob .rotation_euler = spawnPointData .rotation
@@ -266,8 +266,8 @@ def createBlenderMaterial(self, materialData):
266266 # Shader specific logic
267267 if materialData .shader == "TankiOnline/SingleTextureShader" :
268268 bsdf = PrincipledBSDFWrapper (ma , is_readonly = False , use_nodes = True )
269- bsdf .roughness = 1.0
270- bsdf .ior = 1.0
269+ bsdf .roughness_set ( 1.0 )
270+ bsdf .ior_set ( 1.0 )
271271
272272 # Try load texture
273273 textureParameter = materialData .textureParameters [0 ]
@@ -277,8 +277,8 @@ def createBlenderMaterial(self, materialData):
277277 addImageTextureToMaterial (texture , ma .node_tree )
278278 elif materialData .shader == "TankiOnline/SpriteShader" :
279279 bsdf = PrincipledBSDFWrapper (ma , is_readonly = False , use_nodes = True )
280- bsdf .roughness = 1.0
281- bsdf .ior = 1.0
280+ bsdf .roughness_set ( 1.0 )
281+ bsdf .ior_set ( 1.0 )
282282
283283 # Try load texture
284284 textureParameter = materialData .textureParameters [0 ]
@@ -287,6 +287,10 @@ def createBlenderMaterial(self, materialData):
287287
288288 addImageTextureToMaterial (texture , ma .node_tree , linkAlpha = True )
289289 elif materialData .shader == "TankiOnline/Terrain" :
290- pass
290+ # XXX: still need to figure out how to do the terrain properly, all manual attempts have yielded mixed results
291+ bsdf = PrincipledBSDFWrapper (ma , is_readonly = False , use_nodes = True )
292+ bsdf .roughness_set (1.0 )
293+ bsdf .ior_set (1.0 )
294+ bsdf .base_color_set ((0.0 , 0.0 , 0.0 ))
291295
292296 return ma
0 commit comments