ModelTranslator: dedupe sanitized material names, set alphaIsTransparency for alpha-test textures
This commit is contained in:
@@ -35,6 +35,13 @@ class TestTemplates(unittest.TestCase):
|
||||
self.assertIn("maxTextureSize: 2048", on)
|
||||
self.assertIn("guid: " + "a" * 32, on)
|
||||
|
||||
def test_texture_meta_alpha_is_transparency(self):
|
||||
default = ua.texture_meta("a" * 32, srgb=True, max_size=2048)
|
||||
ait = ua.texture_meta("a" * 32, srgb=True, max_size=2048,
|
||||
alpha_is_transparency=True)
|
||||
self.assertIn("alphaIsTransparency: 0", default)
|
||||
self.assertIn("alphaIsTransparency: 1", ait)
|
||||
|
||||
def test_material_yaml_refs_and_keyword(self):
|
||||
y = ua.material_yaml("tong_wood", "s" * 32, "c" * 32, "d" * 32, alpha_test=True)
|
||||
self.assertIn("m_Name: tong_wood", y)
|
||||
|
||||
Reference in New Issue
Block a user