diff --git a/io_ogre/ogre/material.py b/io_ogre/ogre/material.py index 5186191..70ed196 100644 --- a/io_ogre/ogre/material.py +++ b/io_ogre/ogre/material.py @@ -194,7 +194,7 @@ def generate_pass( self, mat, pass_name="" ): if mat.blend_method == "CLIP": alpha = mat_wrapper.alpha self.w.iword('alpha_rejection greater_equal').round(255*mat.alpha_threshold).nl() - elif mat.blend_method != "OPAQUE": + elif mat.blend_method == "BLEND": alpha = mat_wrapper.alpha self.w.iword('scene_blend alpha_blend').nl() if mat.show_transparent_back: diff --git a/io_ogre/ogre/materialv2json.py b/io_ogre/ogre/materialv2json.py index 38420db..bda5e03 100644 --- a/io_ogre/ogre/materialv2json.py +++ b/io_ogre/ogre/materialv2json.py @@ -212,7 +212,7 @@ def generate_pbs_datablock(self, material): pass elif material.blend_method == "CLIP": # CLIP enables alpha_test (alpha rejection) datablock["alpha_test"] = ["greater_equal", material.alpha_threshold, False] - elif material.blend_method in ["HASHED", "BLEND"]: + elif material.blend_method == "BLEND": datablock["transparency"] = { "mode": "Transparent", "use_alpha_from_textures": tex_filename != None, # DEFAULT