wmo_file.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:Blender-WMO-import-export-scripts 作者: WowDevTools 项目源码 文件源码
def compare_materials(self, material):
        """ Compare two WoW material properties """

        get_attributes = operator.attrgetter(
            'Shader', 'TerrainType', 'BlendingMode',
            'Texture1', 'EmissiveColor', 'Flags',
            'Texture2', 'DiffColor')

        mat1 = get_attributes(material.WowMaterial)

        for material2, index in self.material_lookup.items():

            if mat1 == get_attributes(material2.WowMaterial):
                return index

        return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号